From a1fabe3e53430a7876f1f4ae77dbdeb750b6ba78 Mon Sep 17 00:00:00 2001 From: tishiljk3 Date: Thu, 16 Mar 2023 17:39:08 +0530 Subject: [PATCH] - Remove unwanted else statements --- flask_peewee/rest.py | 3 +-- flask_peewee/serializer.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/flask_peewee/rest.py b/flask_peewee/rest.py index 05c3170..951e511 100644 --- a/flask_peewee/rest.py +++ b/flask_peewee/rest.py @@ -429,8 +429,7 @@ def read_request_data(self): return json.loads(request.data.decode('utf-8')) elif request.form.get('data'): return json.loads(request.form['data']) - else: - return dict(request.form) + return dict(request.form) def create(self): try: diff --git a/flask_peewee/serializer.py b/flask_peewee/serializer.py index 4d79fc8..6b68dd8 100644 --- a/flask_peewee/serializer.py +++ b/flask_peewee/serializer.py @@ -23,8 +23,7 @@ def convert_value(self, value): return value._pk elif isinstance(value, uuid.UUID): return str(value) - else: - return value + return value def clean_data(self, data): for key, value in data.items():