mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 00:11:16 -05:00
19 lines
546 B
Python
19 lines
546 B
Python
|
|
from app.models import LetterBranding
|
||
|
|
|
||
|
|
|
||
|
|
def get_letter_branding_or_platform_default(domain=None):
|
||
|
|
letter_branding = None
|
||
|
|
if domain:
|
||
|
|
letter_branding = LetterBranding.query.filter(
|
||
|
|
LetterBranding.domain == domain
|
||
|
|
).first()
|
||
|
|
if not letter_branding:
|
||
|
|
letter_branding = LetterBranding.query.filter(
|
||
|
|
LetterBranding.platform_default == True # noqa
|
||
|
|
).first()
|
||
|
|
return letter_branding
|
||
|
|
|
||
|
|
|
||
|
|
def get_all_letter_branding():
|
||
|
|
return LetterBranding.query.order_by(LetterBranding.name).all()
|