Skip to content

Commit

Permalink
sync title (#231)
Browse files Browse the repository at this point in the history
* sync title

* v1.6.10

---------

Co-authored-by: Sam Wolfe <sam@topleft.team>
Co-authored-by: Matt Fox <matt@topleft.team>
  • Loading branch information
3 people authored Nov 4, 2024
1 parent fc95b59 commit 79105d7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion djautotask/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
VERSION = (1, 6, 9, 'final')
VERSION = (1, 6, 10, 'final')

# pragma: no cover
if VERSION[-1] != "final":
Expand Down
18 changes: 18 additions & 0 deletions djautotask/migrations/0120_resource_title.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
1 change: 1 addition & 0 deletions djautotask/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 1 addition & 0 deletions djautotask/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 79105d7

Please sign in to comment.