diff --git a/atlas/migrations/0024_uncategoriseddicom_created_date.py b/atlas/migrations/0024_uncategoriseddicom_created_date.py new file mode 100644 index 00000000..30452ed1 --- /dev/null +++ b/atlas/migrations/0024_uncategoriseddicom_created_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.1.4 on 2023-10-24 21:31 + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('atlas', '0023_condition_rcr_curriculum_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='uncategoriseddicom', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now), + ), + ] diff --git a/atlas/models.py b/atlas/models.py index e9d20e1c..1232eb8a 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -822,6 +822,8 @@ class UncategorisedDicom(models.Model): image_md5_hash = models.CharField(max_length=32, null=True, blank=True) + created_date = models.DateTimeField(default=timezone.now) + def check_for_duplicates(self, image_hash): duplicate = None diff --git a/atlas/templates/atlas/user_uploads.html b/atlas/templates/atlas/user_uploads.html index 7b283177..63efec2b 100644 --- a/atlas/templates/atlas/user_uploads.html +++ b/atlas/templates/atlas/user_uploads.html @@ -13,12 +13,12 @@ {% if series_list %}