asset: avoid exceptions in get_identifiers()

This commit is contained in:
Frederik Jaeckel 2023-06-23 16:29:10 +02:00
parent 5573f26e9e
commit b672efcd6d

View file

@ -838,7 +838,7 @@ class Asset(SymbolMixin, ModelSQL, ModelView):
cursor = Transaction().connection.cursor()
result = {x: {y.id: None for y in assets} for x in names}
if assets:
query = cls.get_identifier_sql(tab_asset)
query.where = tab_asset.id.in_([x.id for x in assets])
@ -851,7 +851,6 @@ class Asset(SymbolMixin, ModelSQL, ModelView):
for n in names:
result[n][id1] = r1[n]
return result
def get_rec_name(self, name):