stash
All checks were successful
/ test (push) Successful in 57s

This commit is contained in:
j3d1 2024-11-21 00:34:00 +01:00
parent 4f08a2c265
commit f00afb86d6
4 changed files with 5 additions and 11 deletions

View file

@ -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<pk>\d+)/comment/$', add_comment, name='add_comment'),
re_path(r'^(?P<event_slug>[\w-]+)/tickets/manual/$', manual_ticket, name='manual_ticket'),
re_path(r'^(?P<event_slug>[\w-]+)/tickets/(?P<query>[-A-Za-z0-9+/]*={0,3})/$', search_issues,
name='search_issues'),
name='search_issues'),
] + router.urls)

View file

@ -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 = [

View file

@ -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()

View file

@ -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",
# )