Formatting and syntax improvements
This commit is contained in:
parent
fa57100cd5
commit
7d0be20842
3 changed files with 15 additions and 16 deletions
|
@ -14,10 +14,8 @@ def get_recent_releases(service_name, region_name):
|
||||||
.join(QuayService)
|
.join(QuayService)
|
||||||
.switch(QuayRelease)
|
.switch(QuayRelease)
|
||||||
.join(QuayRegion)
|
.join(QuayRegion)
|
||||||
.where(
|
.where(QuayService.name == service_name,
|
||||||
QuayService.name == service_name,
|
|
||||||
QuayRegion.name == region_name,
|
QuayRegion.name == region_name,
|
||||||
QuayRelease.reverted == False,
|
QuayRelease.reverted == False,
|
||||||
)
|
)
|
||||||
.order_by(QuayRelease.created.desc())
|
.order_by(QuayRelease.created.desc()))
|
||||||
)
|
|
||||||
|
|
|
@ -97,17 +97,17 @@ def create_v1_storage(location_name):
|
||||||
return storage
|
return storage
|
||||||
|
|
||||||
|
|
||||||
def find_or_create_storage_signature(storage, signature_kind):
|
def find_or_create_storage_signature(storage, signature_kind_name):
|
||||||
found = lookup_storage_signature(storage, signature_kind)
|
found = lookup_storage_signature(storage, signature_kind_name)
|
||||||
if found is None:
|
if found is None:
|
||||||
kind = ImageStorageSignatureKind.get(name=signature_kind)
|
kind = ImageStorageSignatureKind.get(name=signature_kind_name)
|
||||||
found = ImageStorageSignature.create(storage=storage, kind=kind)
|
found = ImageStorageSignature.create(storage=storage, kind=kind)
|
||||||
|
|
||||||
return found
|
return found
|
||||||
|
|
||||||
|
|
||||||
def lookup_storage_signature(storage, signature_kind):
|
def lookup_storage_signature(storage, signature_kind_name):
|
||||||
kind = ImageStorageSignatureKind.get(name=signature_kind)
|
kind = ImageStorageSignatureKind.get(name=signature_kind_name)
|
||||||
try:
|
try:
|
||||||
return (ImageStorageSignature
|
return (ImageStorageSignature
|
||||||
.select()
|
.select()
|
||||||
|
|
|
@ -368,6 +368,7 @@ def lookup_federated_login(user, service_name):
|
||||||
except FederatedLogin.DoesNotExist:
|
except FederatedLogin.DoesNotExist:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def create_confirm_email_code(user, new_email=None):
|
def create_confirm_email_code(user, new_email=None):
|
||||||
if new_email:
|
if new_email:
|
||||||
if not validate_email(new_email):
|
if not validate_email(new_email):
|
||||||
|
|
Reference in a new issue