diff --git a/uhepp_org/uhepp_api/fixtures/collections.json b/uhepp_org/uhepp_api/fixtures/collections.json index d2730ebf6d5884757a8733c1f1d22e384691b49d..69153ac4de5efdc71aecefca4a9a78eaf1862995 100644 --- a/uhepp_org/uhepp_api/fixtures/collections.json +++ b/uhepp_org/uhepp_api/fixtures/collections.json @@ -1 +1 @@ -[{"model": "uhepp_vault.collection", "pk": 1, "fields": {"title": "Frank at the zoo", "slug": "", "owner": 1, "description": null, "visibility": 30}}, {"model": "uhepp_vault.collection", "pk": 2, "fields": {"title": "Frank in the office", "slug": "", "owner": 1, "description": null, "visibility": 20}}, {"model": "uhepp_vault.collection", "pk": 3, "fields": {"title": "Frank at home", "slug": "", "owner": 1, "description": null, "visibility": 10}}, {"model": "uhepp_vault.collection", "pk": 4, "fields": {"title": "Karl at the zoo", "slug": "", "owner": 4, "description": null, "visibility": 30}}, {"model": "uhepp_vault.collection", "pk": 5, "fields": {"title": "Karl in the office", "slug": "", "owner": 4, "description": null, "visibility": 20}}, {"model": "uhepp_vault.collection", "pk": 6, "fields": {"title": "Karl at home", "slug": "", "owner": 4, "description": null, "visibility": 10}}, {"model": "uhepp_vault.collection", "pk": 7, "fields": {"title": "John at the zoo", "slug": "", "owner": 3, "description": null, "visibility": 30}}, {"model": "uhepp_vault.collection", "pk": 8, "fields": {"title": "John in the office", "slug": "", "owner": 3, "description": null, "visibility": 20}}, {"model": "uhepp_vault.collection", "pk": 9, "fields": {"title": "John at home", "slug": "", "owner": 3, "description": null, "visibility": 10}}] \ No newline at end of file +[{"model": "uhepp_vault.collection", "pk": 1, "fields": {"title": "Frank at the zoo", "slug": "", "owner": 1, "description": null, "visibility": 30, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 2, "fields": {"title": "Frank in the office", "slug": "", "owner": 1, "description": null, "visibility": 20, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 3, "fields": {"title": "Frank at home", "slug": "", "owner": 1, "description": null, "visibility": 10, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 4, "fields": {"title": "Karl at the zoo", "slug": "", "owner": 4, "description": null, "visibility": 30, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 5, "fields": {"title": "Karl in the office", "slug": "", "owner": 4, "description": null, "visibility": 20, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 6, "fields": {"title": "Karl at home", "slug": "", "owner": 4, "description": null, "visibility": 10, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 7, "fields": {"title": "John at the zoo", "slug": "", "owner": 3, "description": null, "visibility": 30, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 8, "fields": {"title": "John in the office", "slug": "", "owner": 3, "description": null, "visibility": 20, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}, {"model": "uhepp_vault.collection", "pk": 9, "fields": {"title": "John at home", "slug": "", "owner": 3, "description": null, "visibility": 10, "activity": "2021-02-23T00:00:00+01:00", "created": "2021-02-23T00:00:00+01:00"}}] diff --git a/uhepp_org/uhepp_vault/models.py b/uhepp_org/uhepp_vault/models.py index 88d909596ea01cb77bbdf0162558cf1f045dd681..4b54c9e2e92d0a0392168be0e6d44a7fe5c9986e 100644 --- a/uhepp_org/uhepp_vault/models.py +++ b/uhepp_org/uhepp_vault/models.py @@ -38,8 +38,8 @@ class Collection(models.Model): choices=VISIBILITY_LEVELS, default=PRIVATE_LEVEL, ) - created = models.DateTimeField(auto_now_add=True, null=True) - activity = models.DateTimeField(auto_now_add=True, null=True) + created = models.DateTimeField(auto_now_add=True) + activity = models.DateTimeField(auto_now_add=True) class Meta: ordering = ['-activity', Lower('title')]