From b1f18230a23ad13d253525f7d9ba81bb56ee4f94 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 19 Aug 2019 16:32:28 +0100 Subject: Code quality --- app/main/demo.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/main') diff --git a/app/main/demo.py b/app/main/demo.py index 7e21768..2c0f1bc 100644 --- a/app/main/demo.py +++ b/app/main/demo.py @@ -336,10 +336,9 @@ def process_annotations(demo_id): ) return redirect(url_for("main.index")) - if annotation["changepoints"] is None: - retval = [] - else: - retval = [cp["x"] for cp in annotation["changepoints"]] + retval = [] + if not annotation["changepoints"] is None: + retval = [int(cp["x"]) for cp in annotation["changepoints"]] # If the user is already introduced, we assume that their demo annotations # are already in the database, and thus we don't put them back in (because -- cgit v1.2.3