Do not use coalesce for consumers.uuid
The consumers.uuid and allocations.consumer_id are not Nullable. Change-Id: I37065f7eb0809921a885f62ad6f30e6a2fbfd174
This commit is contained in:
parent
1a6cc9af4a
commit
9668281a4e
|
@ -263,8 +263,7 @@ def _get_allocations_by_provider_id(ctx, rp_id):
|
|||
allocs.c.created_at,
|
||||
consumers.c.id.label("consumer_id"),
|
||||
consumers.c.generation.label("consumer_generation"),
|
||||
sql.func.coalesce(
|
||||
consumers.c.uuid, allocs.c.consumer_id).label("consumer_uuid"),
|
||||
consumers.c.uuid.label("consumer_uuid"),
|
||||
projects.c.id.label("project_id"),
|
||||
projects.c.external_id.label("project_external_id"),
|
||||
users.c.id.label("user_id"),
|
||||
|
@ -303,8 +302,7 @@ def _get_allocations_by_consumer_uuid(ctx, consumer_uuid):
|
|||
consumer.c.id.label("consumer_id"),
|
||||
consumer.c.generation.label("consumer_generation"),
|
||||
consumer.c.consumer_type_id,
|
||||
sql.func.coalesce(
|
||||
consumer.c.uuid, allocs.c.consumer_id).label("consumer_uuid"),
|
||||
consumer.c.uuid.label("consumer_uuid"),
|
||||
project.c.id.label("project_id"),
|
||||
project.c.external_id.label("project_external_id"),
|
||||
user.c.id.label("user_id"),
|
||||
|
|
Loading…
Reference in New Issue