stash
This commit is contained in:
parent
9134f6b95e
commit
ec6bfc0d3f
4 changed files with 5 additions and 11 deletions
|
@ -1,4 +1,3 @@
|
||||||
import logging
|
|
||||||
from base64 import b64decode
|
from base64 import b64decode
|
||||||
|
|
||||||
from django.urls import re_path
|
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'matches', RelationViewSet, basename='matches')
|
||||||
router.register(r'shipping_vouchers', ShippingVoucherViewSet, basename='shipping_vouchers')
|
router.register(r'shipping_vouchers', ShippingVoucherViewSet, basename='shipping_vouchers')
|
||||||
|
|
||||||
|
|
||||||
# [-A-Za-z0-9+/]*={0,3}
|
# [-A-Za-z0-9+/]*={0,3}
|
||||||
urlpatterns = ([
|
urlpatterns = ([
|
||||||
re_path(r'tickets/states/$', get_available_states, name='get_available_states'),
|
re_path(r'tickets/states/$', get_available_states, name='get_available_states'),
|
||||||
|
|
|
@ -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
|
from django.db import migrations, models
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
@ -7,8 +7,8 @@ import django.db.models.deletion
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('inventory', '0006_alter_event_table'),
|
('inventory', '0008_alter_item_event_alter_itemplacement_container_and_more'),
|
||||||
('tickets', '0011_train_old_spam'),
|
('tickets', '0012_alter_itemrelation_item'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
|
@ -52,8 +52,6 @@ class IssueSerializer(BasicIssueSerializer):
|
||||||
ret = super().to_internal_value(data)
|
ret = super().to_internal_value(data)
|
||||||
if 'state' in data:
|
if 'state' in data:
|
||||||
ret['state'] = data['state']
|
ret['state'] = data['state']
|
||||||
# if 'assigned_to' in data:
|
|
||||||
# ret['assigned_to'] = data['assigned_to']
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def validate(self, attrs):
|
def validate(self, attrs):
|
||||||
|
@ -131,7 +129,6 @@ class IssueSerializer(BasicIssueSerializer):
|
||||||
return sorted(timeline, key=lambda x: x['timestamp'])
|
return sorted(timeline, key=lambda x: x['timestamp'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SearchResultSerializer(serializers.Serializer):
|
class SearchResultSerializer(serializers.Serializer):
|
||||||
search_score = serializers.IntegerField()
|
search_score = serializers.IntegerField()
|
||||||
item = IssueSerializer()
|
item = IssueSerializer()
|
||||||
|
|
|
@ -313,8 +313,7 @@ class IssueApiTest(TestCase):
|
||||||
content_type='application/json')
|
content_type='application/json')
|
||||||
self.assertEqual(response.status_code, 400)
|
self.assertEqual(response.status_code, 400)
|
||||||
|
|
||||||
|
# def test_post_comment(self):
|
||||||
#def test_post_comment(self):
|
|
||||||
# issue = IssueThread.objects.create(
|
# issue = IssueThread.objects.create(
|
||||||
# name="test issue",
|
# name="test issue",
|
||||||
# )
|
# )
|
||||||
|
|
Loading…
Reference in a new issue