From d5a9b5c47102e5a541190118a1c23d8dd10f7f44 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 13 Aug 2017 23:47:17 -0500 Subject: [PATCH] Change how we prevent edit/delete for demo users to take new 'demo' user into account, but also more readable --- rattail_demo/web/views/users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rattail_demo/web/views/users.py b/rattail_demo/web/views/users.py index 73aed0d..0cdf5d4 100644 --- a/rattail_demo/web/views/users.py +++ b/rattail_demo/web/views/users.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8; -*- """ User views """ @@ -14,10 +14,10 @@ class UsersView(base.UsersView): """ def editable_instance(self, user): - return user.uuid != '28eeee92bcf411e6a7c23ca9f40bc550' + return user.username not in ('chuck', 'demo') def deletable_instance(self, user): - return user.uuid != '28eeee92bcf411e6a7c23ca9f40bc550' + return user.username not in ('chuck', 'demo') def includeme(config):