Skip to content

Conversation

@harminius
Copy link
Contributor

Fixes 1. and 3. in https://github.com/MerginMaps/server-private/issues/3154#issuecomment-3778290318

  • adds helper to map API field names to DB column names based on Schema
  • when invalid order param is passed error is thrown

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21246378123

Details

  • 29 of 30 (96.67%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 94.397%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/mergin/utils.py 16 17 94.12%
Totals Coverage Status
Change from base Build 21063718610: 0.03%
Covered Lines: 8120
Relevant Lines: 8602

💛 - Coveralls

order_attr = cls.__table__.c.get(col, None)
if not isinstance(order_attr, Column):
return
abort(400, "Invalid order parameter")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give it to logs just. We suggest with @varmar05 not use this.

@MarcelGeo MarcelGeo changed the title API to DB fields map Workspaces API - order by schema fields instead of database fields Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants