BIG-MAP / FINALES2

Further development of FINALES
MIT License
6 stars 0 forks source link

The `tenant_uuid` of results/request is being generated randomly #206

Closed ramirezfranciscof closed 1 year ago

ramirezfranciscof commented 1 year ago

Instead of being taken from the message sent to the endpoint. Probably a leftover from when the endpoints where not fully working yet.

See here:

        request_obj = DbRequest(
            **{
                "uuid": request_uuid,
                "parameters": json.dumps(request_data.parameters),
                "requesting_tenant_uuid": str(uuid.uuid4()),  # this should be request_data.tenant_uuid
                "requesting_recieved_timestamp": ctime,
                "budget": "not currently implemented in the API",
                "status": RequestStatus.PENDING.value,
            }
        )

And here:

        db_obj = DbResult(
            **{
                "uuid": result_uuid,
                "request_uuid": request_uuid,
                "parameters": json.dumps(received_data.parameters),
                "data": json.dumps(received_data.data),
                "posting_tenant_uuid": str(uuid.uuid4()),  # this should be received_data.tenant_uuid
                "cost": "Not implemented in the API yet",
                "status": ResultStatus.ORIGINAL.value,
                "posting_recieved_timestamp": ctime,
            }
        )
MonikaVo commented 1 year ago

Closed after #210