Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
remove error in vote api
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Mar 13, 2016
1 parent 30db82c commit 0b6d8c3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions laws/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ class Meta(BaseResource.Meta):

def build_filters(self, filters={}):
orm_filters = super(VoteResource, self).build_filters(filters)
if 'member' in filters:
orm_filters["voteaction__member"] = filters['member']
if 'member_for' in filters:
orm_filters["voteaction__member"] = filters['member_for']
orm_filters["voteaction__type"] = 'for'
if 'member_against' in filters:
orm_filters["voteaction__member"] = filters['member_against']
orm_filters["voteaction__type"] = 'against'
# if 'member' in filters:
# orm_filters["voteaction__member"] = filters['member']
# if 'member_for' in filters:
# orm_filters["voteaction__member"] = filters['member_for']
# orm_filters["voteaction__type"] = 'for'
# if 'member_against' in filters:
# orm_filters["voteaction__member"] = filters['member_against']
# orm_filters["voteaction__type"] = 'against'
if 'tag' in filters:
# hard-coded the __in filter. not great, but works.
orm_filters["tagged_items__tag__in"] = \
Expand Down

0 comments on commit 0b6d8c3

Please sign in to comment.