diff --git a/data/model/release.py b/data/model/release.py index 9427f1e71..f827eaeb0 100644 --- a/data/model/release.py +++ b/data/model/release.py @@ -2,10 +2,10 @@ from data.database import QuayRelease, QuayRegion, QuayService def set_region_release(service_name, region_name, version): - service, _ = QuayService.create_or_get(name=service_name) - region, _ = QuayRegion.create_or_get(name=region_name) + service, _ = QuayService.get_or_create(name=service_name) + region, _ = QuayRegion.get_or_create(name=region_name) - return QuayRelease.create_or_get(service=service, version=version, region=region) + return QuayRelease.get_or_create(service=service, version=version, region=region) def get_recent_releases(service_name, region_name):