jorde/django-user-metrics — comment on commit ef3d2b3ed4fffa75193116cd31453125ab0394d7
File: user_metrics/api.py line 14
By rmaceissoft:

this line is not sure. if date_up is None, it must not be passed when metric item is created (**date_up is not null**)
Something like this could solving:

kwargs = dict(metric=metric, user=user, count=count)
if date_up:
kwargs['date_up'] = date_up
MetricItem.object.create(**kwargs)