Skip to content

Conversation

manneohrstrom
Copy link
Contributor

Previously, mockgun just ignored the ordering parameter on find() and find_one(). This adds basic ordering support. This change is needed for the unit test added here: shotgunsoftware/tk-core#266

# order: [{"field_name": "code", "direction": "asc"}, ... ]
for order_entry in order:
if "field_name" not in order_entry:
raise ValueError("Order clauses must be list of dicts with keys field_name and direction!")
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: maybe single quotes around the key names to distinguish?

'field_name' and 'direction'

@josh-t
Copy link
Contributor

josh-t commented Apr 13, 2016

One very minor comment. This one looks good to go!

@manneohrstrom manneohrstrom deleted the 35786_mockgun_order branch April 19, 2016 00:45
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.

2 participants