From d9fe1e122cafabe909a8853a490f6c8e1efd7a1c Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 14 Jun 2024 20:11:04 +0200 Subject: [PATCH] stash --- .../0011_issuethread_related_items.py | 19 +++++++++++++++++++ core/tickets/serializers.py | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 core/tickets/migrations/0011_issuethread_related_items.py diff --git a/core/tickets/migrations/0011_issuethread_related_items.py b/core/tickets/migrations/0011_issuethread_related_items.py new file mode 100644 index 0000000..68240bc --- /dev/null +++ b/core/tickets/migrations/0011_issuethread_related_items.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.7 on 2024-06-14 17:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('inventory', '0004_alter_event_created_at_alter_item_created_at'), + ('tickets', '0010_itemrelation'), + ] + + operations = [ + migrations.AddField( + model_name='issuethread', + name='related_items', + field=models.ManyToManyField(through='tickets.ItemRelation', to='inventory.item'), + ), + ] diff --git a/core/tickets/serializers.py b/core/tickets/serializers.py index a980b97..3d850c4 100644 --- a/core/tickets/serializers.py +++ b/core/tickets/serializers.py @@ -52,8 +52,8 @@ class IssueSerializer(serializers.ModelSerializer): ret = super().to_internal_value(data) if 'state' in data: ret['state'] = data['state'] -# if 'assigned_to' in data: -# ret['assigned_to'] = data['assigned_to'] + # if 'assigned_to' in data: + # ret['assigned_to'] = data['assigned_to'] return ret def validate(self, attrs):