@@ -124,6 +124,8 @@ def decrypt(request): |
||
124 | 124 |
elog = MchInfoEncryptLogInfo.objects.get(sn=sn) |
125 | 125 |
except MchInfoEncryptLogInfo.DoesNotExist: |
126 | 126 |
elog = None |
127 |
+ except MchInfoEncryptLogInfo.MultipleObjectsReturned: |
|
128 |
+ elog = None |
|
127 | 129 |
|
128 | 130 |
return response(200, data={ |
129 | 131 |
'plaintext': plaintext, |
@@ -389,6 +389,8 @@ def consumer_info_api(request): |
||
389 | 389 |
elog = MchInfoEncryptLogInfo.objects.select_for_update().get(sn=serialNo) |
390 | 390 |
except MchInfoEncryptLogInfo.DoesNotExist: |
391 | 391 |
elog = None |
392 |
+ except MchInfoEncryptLogInfo.MultipleObjectsReturned: |
|
393 |
+ elog = None |
|
392 | 394 |
|
393 | 395 |
if elog and not dupload: |
394 | 396 |
amount = 100 |
@@ -38,6 +38,8 @@ class Command(CompatibilityBaseCommand): |
||
38 | 38 |
elog = MchInfoEncryptLogInfo.objects.select_for_update().get(sn=v.get('sn', '')) |
39 | 39 |
except MchInfoEncryptLogInfo.DoesNotExist: |
40 | 40 |
continue |
41 |
+ except MchInfoEncryptLogInfo.MultipleObjectsReturned: |
|
42 |
+ continue |
|
41 | 43 |
|
42 | 44 |
try: |
43 | 45 |
user = UserInfo.objects.get(user_id=v.get('user_id', '')) |