GrafeasGroup / blossom

The website. The app. The everything.
6 stars 3 forks source link

Fix error in `BlossomUser.date_last_active` calculation #464

Open TimJentzsch opened 1 year ago

TimJentzsch commented 1 year ago

https://github.com/GrafeasGroup/blossom/blob/350eb08af37d6da62ea5986712ab2892d9493441/blossom/authentication/models.py#L116-L128

When there are null entries for complete_time or claim_time, these actually appear first with the -complete_time and -claim_time orderings.

So we need to explicitly filter out null entries, e.g. by using complete_time__isnull=False.