Parcourir la source

correct README; delete broken code

yobafromstarvvars il y a 1 an
Parent
commit
821b4ae8a0
2 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. 2 2
      README.md
  2. 4 3
      serializer/orders_local.py

+ 2 - 2
README.md

@@ -8,7 +8,7 @@ A module for processing customer orders implemented as a Django application.
 1) Download or clone repository
 
 ```bash
-git clone https://git.sharix-app.org/ShariX_Open/sharix-open-webservice-running.git
+git clone -b unstable https://git.sharix-app.org/ShariX_Open/sharix-open-webservice-running.git webservice_running
 ```
 
 2) Install required dependencies in project settings
@@ -27,7 +27,7 @@ INSTALLED_APPS = [
   urlpatterns = (
   [
     ...
-    path('webservice/', include("webservice_running.urls"), name='webservice'),
+    path('webservice/', include("webservice_running.urls"), name='webservice_running'),
     ...
   ]
   )

+ 4 - 3
serializer/orders_local.py

@@ -8,7 +8,6 @@ from tickets.serializer import TaskSerializer
 from rest_framework.utils import model_meta
 import pprint
 from django.db import connection
-from webservice_running.exceptions import *
 
 
 class OrderNotDefined(Exception):
@@ -64,9 +63,11 @@ class OrdersLocalSerializer(serializers.ModelSerializer):
 
 
     def update(self, instance, validated_data):
-        # pprint.pprint(connection.queries)
+        """
+        Normally order_synced is not null, but in testing it is null=True, so it can produce exceptions
+        """
 
-        order_instance = instance.order_synced #if "order_synced" not in validated_data else validated_data["order_synced"]
+        order_instance = instance.order_synced
         if not order_instance:
             raise OrderNotDefined()
         ticket_instance = instance.order_synced.ticket