|
|
@@ -71,6 +71,7 @@ def get_fueling_task_by_id(fuel_task_id: int, db: Session): |
|
|
|
imageafter = fuel_task.ImageAfter |
|
|
|
imagebeforeBase64 = base64.b64encode(imagebefore).decode("ascii") |
|
|
|
imageafterBase64 = base64.b64encode(imageafter).decode("ascii") |
|
|
|
res["Creator"] = fuel_task.CreatedById |
|
|
|
res["ImageBefore"] = imagebeforeBase64 |
|
|
|
res["ImageAfter"] = imageafterBase64 |
|
|
|
res["Driver"] = driver_obj |
|
|
@@ -85,6 +86,7 @@ def get_all_fueling_tasks(db: Session): |
|
|
|
res = task.__dict__ |
|
|
|
res["ImageBefore"] = "" |
|
|
|
res["ImageAfter"] = "" |
|
|
|
res["Creator"] = task.CreatedById |
|
|
|
driver = get_user_by_id(task.DriverId, role="Driver", db=db) |
|
|
|
driver_obj = driver.__dict__ |
|
|
|
res["Driver"] = driver_obj |
|
|
|