diff --git a/src/web/db.sqlite3 b/src/web/db.sqlite3 index 28e61ba..5d2ce5a 100644 Binary files a/src/web/db.sqlite3 and b/src/web/db.sqlite3 differ diff --git a/src/web/tracker/migrations/0006_alter_session_duration_calculated_and_more.py b/src/web/tracker/migrations/0006_alter_session_duration_calculated_and_more.py new file mode 100644 index 0000000..939b8b0 --- /dev/null +++ b/src/web/tracker/migrations/0006_alter_session_duration_calculated_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 4.1.4 on 2022-12-31 13:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("tracker", "0005_alter_purchase_date_refunded"), + ] + + operations = [ + migrations.AlterField( + model_name="session", + name="duration_calculated", + field=models.DurationField(blank=True, null=True), + ), + migrations.AlterField( + model_name="session", + name="duration_manual", + field=models.DurationField(blank=True, null=True), + ), + migrations.AlterField( + model_name="session", + name="note", + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/src/web/tracker/models.py b/src/web/tracker/models.py index 32ed089..b18867c 100644 --- a/src/web/tracker/models.py +++ b/src/web/tracker/models.py @@ -31,9 +31,9 @@ class Session(models.Model): purchase = models.ForeignKey("Purchase", on_delete=models.CASCADE) timestamp_start = models.DateTimeField() timestamp_end = models.DateTimeField() - duration_manual = models.DurationField() - duration_calculated = models.DurationField() - note = models.TextField() + duration_manual = models.DurationField(blank=True, null=True) + duration_calculated = models.DurationField(blank=True, null=True) + note = models.TextField(blank=True, null=True) def __str__(self): return self.purchase diff --git a/src/web/tracker/templates/list_sessions.html b/src/web/tracker/templates/list_sessions.html index daf4d43..b09023c 100644 --- a/src/web/tracker/templates/list_sessions.html +++ b/src/web/tracker/templates/list_sessions.html @@ -9,7 +9,7 @@