Compare commits

..

No commits in common. "f60250bb212c1ab144ac11ae02a058a6e57bb4ce" and "2c9c74131c5dccb8e3e972ee4b167d63b302c5cd" have entirely different histories.

2 changed files with 1 additions and 18 deletions

View File

@ -24,13 +24,6 @@ class WprSerializer(CustomModelSerializer):
class Meta:
model = Wpr
fields = '__all__'
def to_representation(self, instance):
ret = super().to_representation(instance)
material_name = ret.get("material_name", "")
if material_name:
ret["process_name"] = material_name.split("|")[-1]
return ret
class WprDetailSerializer(WprSerializer):
mb_ = MaterialBatchSerializer(source='mb', read_only=True)

View File

@ -118,17 +118,7 @@ class JSONRequestHandler(BaseHTTPRequestHandler):
res = handle_bytes(resp)
if isinstance(res, str):
if res == "数据头不正确":
sc, resp = connect_and_send()
if sc is None or resp is None:
return
res = handle_bytes(resp)
if isinstance(res, str):
self.error(res)
else:
self.ok(res)
else:
self.error(res)
self.error(res)
else:
self.ok(res)