Skip to content

Commit

Permalink
make fix
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Mar 7, 2019
1 parent af63fb4 commit 5befead
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@

# action URLs
url(r'^bounties/funder', retail.views.funder_bounties, name='funder_bounties'),
re_path(r'^bounties/contributor/?(?P<tech_stack>.*)/?', retail.views.contributor_bounties,
name='contributor_bounties'),
re_path(
r'^bounties/contributor/?(?P<tech_stack>.*)/?', retail.views.contributor_bounties, name='contributor_bounties'
),
re_path(r'^bounty/quickstart/?', dashboard.views.quickstart, name='quickstart'),
url(r'^bounty/new/?', dashboard.views.new_bounty, name='new_bounty'),
re_path(r'^bounty/change/(?P<bounty_id>.*)?', dashboard.views.change_bounty, name='change_bounty'),
Expand Down
6 changes: 4 additions & 2 deletions app/economy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

from __future__ import unicode_literals

import json

from django.contrib.humanize.templatetags.humanize import naturaltime
from django.contrib.postgres.fields import JSONField
from django.core.serializers.json import DjangoJSONEncoder
Expand Down Expand Up @@ -50,9 +52,9 @@ def default(self, obj):
elif isinstance(obj, QuerySet):
if obj.count() and type(obj.first()) == str:
return obj[::1]
return [EncodeAnything(instance) for instance in obj]
return [json.dumps(instance, cls=EncodeAnything) for instance in obj]
elif isinstance(obj, list):
return [EncodeAnything(instance) for instance in obj]
return [json.dumps(instance, cls=EncodeAnything) for instance in obj]
elif(callable(obj)):
return None
return super(EncodeAnything, self).default(obj)
Expand Down

0 comments on commit 5befead

Please sign in to comment.