Skip to content

Commit

Permalink
get or create: do not rely on name, only on slug
Browse files Browse the repository at this point in the history
  • Loading branch information
jbl2024 committed Dec 23, 2013
1 parent fa56492 commit 4a1504b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app_metrics/utils.py
Expand Up @@ -89,7 +89,7 @@ def get_or_create_metric(name, slug):
if not should_create_models():
return

metric, created = Metric.objects.get_or_create(name=name, slug=slug)
metric, created = Metric.objects.get_or_create(slug=slug, defaults={'name': name})
return metric


Expand Down

0 comments on commit 4a1504b

Please sign in to comment.