From e2d43a9e8e2603c09dcf5f8bfa4a0fe5412a7ce3 Mon Sep 17 00:00:00 2001
From: Frank Sauerburger <frank@sauerburger.com>
Date: Tue, 23 Feb 2021 17:55:28 +0100
Subject: [PATCH] Add date fields to fixtures

---
 uhepp_org/uhepp_api/fixtures/collections.json | 2 +-
 uhepp_org/uhepp_vault/models.py               | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/uhepp_org/uhepp_api/fixtures/collections.json b/uhepp_org/uhepp_api/fixtures/collections.json
index d2730eb..69153ac 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 88d9095..4b54c9e 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')]
-- 
GitLab