Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Commit

Permalink
Change to require an operator for cleaner syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bruth committed Oct 14, 2012
1 parent 2918a96 commit 5eea1bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modeltree/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def query_string_for_field(self, field, operator=None):
path.append(operator)
return str('__'.join(path))

def query_condition(self, field, value, operator=None):
def query_condition(self, field, operator, value):
"Conveniece method for constructing a `Q` object for a given field."
lookup = self.query_string_for_field(field, operator)
return Q(**{lookup: value})
Expand Down

0 comments on commit 5eea1bb

Please sign in to comment.