diff --git a/core/tickets/api_v2.py b/core/tickets/api_v2.py index 7552a73..008e0af 100644 --- a/core/tickets/api_v2.py +++ b/core/tickets/api_v2.py @@ -1,4 +1,3 @@ -import logging from base64 import b64decode from django.urls import re_path @@ -166,7 +165,6 @@ router.register(r'tickets', IssueViewSet, basename='issues') router.register(r'matches', RelationViewSet, basename='matches') router.register(r'shipping_vouchers', ShippingVoucherViewSet, basename='shipping_vouchers') - # [-A-Za-z0-9+/]*={0,3} urlpatterns = ([ re_path(r'tickets/states/$', get_available_states, name='get_available_states'), @@ -174,5 +172,5 @@ urlpatterns = ([ re_path(r'^tickets/(?P\d+)/comment/$', add_comment, name='add_comment'), re_path(r'^(?P[\w-]+)/tickets/manual/$', manual_ticket, name='manual_ticket'), re_path(r'^(?P[\w-]+)/tickets/(?P[-A-Za-z0-9+/]*={0,3})/$', search_issues, - name='search_issues'), + name='search_issues'), ] + router.urls) diff --git a/core/tickets/migrations/0012_remove_issuethread_related_items_and_more.py b/core/tickets/migrations/0013_remove_issuethread_related_items_and_more.py similarity index 80% rename from core/tickets/migrations/0012_remove_issuethread_related_items_and_more.py rename to core/tickets/migrations/0013_remove_issuethread_related_items_and_more.py index d8a24c7..29da48f 100644 --- a/core/tickets/migrations/0012_remove_issuethread_related_items_and_more.py +++ b/core/tickets/migrations/0013_remove_issuethread_related_items_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.7 on 2024-11-20 23:58 +# Generated by Django 4.2.7 on 2024-11-20 23:34 from django.db import migrations, models import django.db.models.deletion @@ -7,8 +7,8 @@ import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('inventory', '0006_alter_event_table'), - ('tickets', '0011_train_old_spam'), + ('inventory', '0008_alter_item_event_alter_itemplacement_container_and_more'), + ('tickets', '0012_alter_itemrelation_item'), ] operations = [ diff --git a/core/tickets/serializers.py b/core/tickets/serializers.py index 1588307..4539283 100644 --- a/core/tickets/serializers.py +++ b/core/tickets/serializers.py @@ -52,8 +52,6 @@ class IssueSerializer(BasicIssueSerializer): 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'] return ret def validate(self, attrs): @@ -133,7 +131,6 @@ class IssueSerializer(BasicIssueSerializer): return sorted(timeline, key=lambda x: x['timestamp']) - class SearchResultSerializer(serializers.Serializer): search_score = serializers.IntegerField() item = IssueSerializer() diff --git a/core/tickets/tests/v2/test_tickets.py b/core/tickets/tests/v2/test_tickets.py index 942d9cd..54bd3fe 100644 --- a/core/tickets/tests/v2/test_tickets.py +++ b/core/tickets/tests/v2/test_tickets.py @@ -303,8 +303,7 @@ class IssueApiTest(TestCase): content_type='application/json') self.assertEqual(response.status_code, 400) - - #def test_post_comment(self): + # def test_post_comment(self): # issue = IssueThread.objects.create( # name="test issue", # )