Skip to content

Commit

Permalink
Fix not using aliased tabel
Browse files Browse the repository at this point in the history
  • Loading branch information
realVinayak committed May 16, 2023
1 parent a1091af commit de94ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specifyweb/stored_queries/format.py
Expand Up @@ -129,7 +129,7 @@ def make_expr(query: QueryConstruct, fieldNode: Element) -> Tuple[QueryConstruct
orm_model,
aggregator_name)
else:
expr = self._fieldformat(formatter_field_spec.get_field(), getattr(getattr(models, formatter_field_spec.root_table.name), formatter_field_spec.get_field().name))
expr = self._fieldformat(formatter_field_spec.get_field(), getattr( orm_table, formatter_field_spec.get_field().name))

if 'format' in fieldNode.attrib:
expr = self.pseudo_sprintf(fieldNode.attrib['format'], expr)
Expand Down

0 comments on commit de94ffd

Please sign in to comment.