HUE-8382 [core] fix django-axes 2.2.0 breaks with error field attempt_time can not be null
Review Request #13087 — Created June 15, 2018 and submitted
Information | |
---|---|
ranade | |
hue | |
master | |
Reviewers | |
hue | |
enricoberti, jgauthier, johan, ranade, romain, roohi, subrata, weixia, yingc |
commit f156f55bbd514746e547aa99fa35967ff301dabe Author: Prakash Ranade <ranade@cloudera.com> Date: Fri Jun 15 17:27:29 2018 -0700 HUE-8382 [core] fix django-axes 2.2.0 breaks with error field attempt_time can not be null As per Django Doc : https://docs.djangoproject.com/en/1.11/ref/models/fields/#datefield The difference between auto_now and auto_now_add options is: "auto_now" set the field to now every time the object is saved. At https://github.com/cloudera/hue/blob/master/desktop/core/ext-py/django-axes-2.2.0/axes/decorators.py#L415 By changing https://github.com/cloudera/hue/blob/master/desktop/core/ext-py/django-axes-2.2.0/axes/models.py#L41 to "auto_now" fixes. Tested: Tested on SLES where it is failing. :100644 100644 6e644816e1... 3a78721fc0... M desktop/core/ext-py/django-axes-2.2.0/axes/models.py