-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #951 from ImageMarkup/improve-mosaic-constraint
Fix RCM mosaic check constraint to accept unprocessed images
- Loading branch information
Showing
2 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
isic/ingest/migrations/0004_remove_accession_accession_is_cog_mosaic_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 5.1 on 2024-08-26 21:05 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import isic_metadata.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("ingest", "0003_accession_accession_is_cog_mosaic"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveConstraint( | ||
model_name="accession", | ||
name="accession_is_cog_mosaic", | ||
), | ||
migrations.AddConstraint( | ||
model_name="accession", | ||
constraint=models.CheckConstraint( | ||
condition=models.Q( | ||
("is_cog", False), | ||
("image_type__isnull", True), | ||
("image_type", isic_metadata.fields.ImageTypeEnum["rcm_mosaic"]), | ||
_connector="OR", | ||
), | ||
name="accession_is_cog_mosaic", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters