diff options
author | John Turner <jturner.usa@gmail.com> | 2025-09-10 01:39:51 -0400 |
---|---|---|
committer | John Turner <jturner.usa@gmail.com> | 2025-09-10 01:39:51 -0400 |
commit | c20a4f0714d30f3ae9eddc16ffd8f987f0ac9cc4 (patch) | |
tree | f0320a4ff31c14d28feca52bfeec6bf556402348 | |
parent | 998bf36dfd1b513011e84b430fa69dbfac926689 (diff) | |
download | pypaste-c20a4f0714d30f3ae9eddc16ffd8f987f0ac9cc4.tar.gz |
make syntax parameter in url take priority over saved syntax setting
-rw-r--r-- | pypaste/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pypaste/__init__.py b/pypaste/__init__.py index 29f7fad..0f0d5e2 100644 --- a/pypaste/__init__.py +++ b/pypaste/__init__.py @@ -164,8 +164,8 @@ class App: log_info(f"{key} does not exist, returning 404") return web.HTTPNotFound() - if (syntax := paste.syntax) is None: - syntax = request.query.get("syntax") + if (syntax := request.query.get("syntax")) is None: + syntax = paste.syntax if (style := request.query.get("style")) is None: style = self.config.default_style |