From 79105d790d8ab4c3e18acf12d3b511f8c1603bcd Mon Sep 17 00:00:00 2001 From: kti-sam <34463040+kti-sam@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:21:56 -0800 Subject: [PATCH] sync title (#231) * sync title * v1.6.10 --------- Co-authored-by: Sam Wolfe Co-authored-by: Matt Fox --- djautotask/__init__.py | 2 +- djautotask/migrations/0120_resource_title.py | 18 ++++++++++++++++++ djautotask/models.py | 1 + djautotask/sync.py | 1 + 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 djautotask/migrations/0120_resource_title.py diff --git a/djautotask/__init__.py b/djautotask/__init__.py index cfedf1b..df8a1b4 100644 --- a/djautotask/__init__.py +++ b/djautotask/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -VERSION = (1, 6, 9, 'final') +VERSION = (1, 6, 10, 'final') # pragma: no cover if VERSION[-1] != "final": diff --git a/djautotask/migrations/0120_resource_title.py b/djautotask/migrations/0120_resource_title.py new file mode 100644 index 0000000..e49b1ff --- /dev/null +++ b/djautotask/migrations/0120_resource_title.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.16 on 2024-10-30 15:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('djautotask', '0119_merge_20241024_1521'), + ] + + operations = [ + migrations.AddField( + model_name='resource', + name='title', + field=models.CharField(blank=True, max_length=250, null=True), + ), + ] diff --git a/djautotask/models.py b/djautotask/models.py index 92397bf..24632d6 100644 --- a/djautotask/models.py +++ b/djautotask/models.py @@ -362,6 +362,7 @@ class Resource(TimeStampedModel): first_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) active = models.BooleanField(default=False) + title = models.CharField(blank=True, null=True, max_length=250) license_type = models.ForeignKey( 'LicenseType', null=True, on_delete=models.SET_NULL ) diff --git a/djautotask/sync.py b/djautotask/sync.py index 12e6b94..e9a7139 100644 --- a/djautotask/sync.py +++ b/djautotask/sync.py @@ -1869,6 +1869,7 @@ def _assign_field_data(self, instance, object_data): instance.first_name = object_data.get('firstName') instance.last_name = object_data.get('lastName') instance.active = object_data.get('isActive') + instance.title = object_data.get('title') self.set_relations(instance, object_data)