diff --git a/src/borghive/migrations/0003_repo_mode.py b/src/borghive/migrations/0003_repo_mode.py index c28dfb9..67ff4ea 100644 --- a/src/borghive/migrations/0003_repo_mode.py +++ b/src/borghive/migrations/0003_repo_mode.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='repository', name='mode', - field=models.CharField(choices=[('BORG', 'Borg'), ('IMPORT', 'Import'), ('EXPORT', 'Export')], default='BORG', max_length=6), + field=models.CharField(blank=True, choices=[('BORG', 'Borg'), ('IMPORT', 'Import'), ('EXPORT', 'Export')], default='BORG', max_length=6), ), migrations.AlterField( model_name='repository', diff --git a/src/borghive/models/repository.py b/src/borghive/models/repository.py index f9d323f..ddc4b9d 100644 --- a/src/borghive/models/repository.py +++ b/src/borghive/models/repository.py @@ -134,6 +134,7 @@ class Repository(BaseModel): max_length=6, choices=RepositoryMode.CHOICES, default=RepositoryMode.BORG, + blank=True ) repo_user = models.OneToOneField(RepositoryUser, on_delete=models.CASCADE)