From c67406b84bd0eebe059ca9f18ab0005e83bdac2c Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 12 Oct 2022 03:45:45 -0700 Subject: [PATCH] use site specific patron name --- files/helpers/media.py | 2 +- files/routes/awards.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index 133e75c27..e6071a254 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -45,7 +45,7 @@ def process_audio(file): size = os.stat(name).st_size if size > MAX_IMAGE_AUDIO_SIZE_MB_PATRON * 1024 * 1024 or not g.v.patron and size > MAX_IMAGE_AUDIO_SIZE_MB * 1024 * 1024: os.remove(name) - abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for paypigs)") + abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for {patron.lower()}s)") media = g.db.query(Media).filter_by(filename=name, kind='audio').one_or_none() if media: g.db.delete(media) diff --git a/files/routes/awards.py b/files/routes/awards.py index 386c846ca..b83046c49 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -313,7 +313,7 @@ def award_thing(v, thing_type, id): else: author.progressivestack = int(time.time()) + 21600 badge_grant(user=author, badge_id=94) elif kind == "benefactor": - if author.patron: abort(400, "This user is already a paypig!") + if author.patron: abort(409, f"This user is already a {patron.lower()}!") author.patron = 1 if author.patron_utc: author.patron_utc += 2629746 else: author.patron_utc = int(time.time()) + 2629746