Skip to content

Commit

Permalink
Update for #179
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrusev committed Sep 17, 2017
1 parent 999df9b commit 8590325
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

### Bugfixes

- [#179](https://github.com/amonapp/amon/issues/179): Tags page error when creating a tag without a group
- [#162](https://github.com/amonapp/amon/issues/162): Email sending not fully functional - replace legacy mailer with Django


Expand Down
5 changes: 3 additions & 2 deletions amon/apps/api/views/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ def get(self, request):
group = tag.get('group')
if group:
data['group'] = dict_from_cursor(data=group, keys=['name', '_id'])
else:
data['group'] = {}

filtered_tags.append(data)


filtered_tags.sort(key=lambda e: e.get('group', {}).get('name'))
filtered_tags.sort(key=lambda e: e.get('group', {}).get('name', ''))

status = settings.API_RESULTS['ok']

Expand Down

0 comments on commit 8590325

Please sign in to comment.