|
@@ -183,6 +183,7 @@ class CbdPhotoAPIView(APIView):
|
|
|
indentify_remote_content = requests.get(indentify).content
|
|
indentify_remote_content = requests.get(indentify).content
|
|
|
with open(indentify_photo, "wb") as f:
|
|
with open(indentify_photo, "wb") as f:
|
|
|
f.write(indentify_remote_content)
|
|
f.write(indentify_remote_content)
|
|
|
|
|
+ photo_time = request_data.get("photo_time")
|
|
|
data = {
|
|
data = {
|
|
|
"device_id": d_id,
|
|
"device_id": d_id,
|
|
|
"addr": addr_org.replace(media, "/media"),
|
|
"addr": addr_org.replace(media, "/media"),
|
|
@@ -190,8 +191,8 @@ class CbdPhotoAPIView(APIView):
|
|
|
"indentify_result": request_data.get("Result"),
|
|
"indentify_result": request_data.get("Result"),
|
|
|
"label": request_data.get("Result_code"),
|
|
"label": request_data.get("Result_code"),
|
|
|
"photo_status": 1,
|
|
"photo_status": 1,
|
|
|
- "uptime": int(time.time()),
|
|
|
|
|
- "addtime": int(time.time())
|
|
|
|
|
|
|
+ "uptime": int(photo_time),
|
|
|
|
|
+ "addtime": int(photo_time)
|
|
|
}
|
|
}
|
|
|
photo = MongoCBDphoto(**data)
|
|
photo = MongoCBDphoto(**data)
|
|
|
photo.save()
|
|
photo.save()
|