Skip to content

Commit

Permalink
feat/data-api (#65)
Browse files Browse the repository at this point in the history
* fix: merge mistake
  • Loading branch information
almosnow committed Aug 28, 2023
1 parent 7195a30 commit b38ad38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions route/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def data_query(arguments):
arguments['_offset'] = 0

data_session = sessionmaker(bind=SQLAlchemyEngine)()

data_entities = list_attributes_of_model(arguments['view'])
if('_columns' in arguments):
data_entities = list(map(lambda x: getattr(arguments['view'], x), filter(lambda x: hasattr(arguments['view'], x), arguments['_columns'])))

data_query = (
data_session
.query(arguments['view'])
Expand Down

0 comments on commit b38ad38

Please sign in to comment.