From 5467ccbd5f7ece7fb96b90108ce6867fbda33337 Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Mon, 31 Aug 2015 10:51:52 -0400 Subject: [PATCH] Fix logic around public for non-pro. --- snipts/api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/snipts/api.py b/snipts/api.py index 7c32fc1..c155307 100644 --- a/snipts/api.py +++ b/snipts/api.py @@ -145,10 +145,8 @@ class SniptValidation(Validation): def is_valid(self, bundle, request=None): errors = {} - print bundle.data['public'] - - if bundle.data['public'] is False and \ - request.user.profile.is_pro is False: + if request.user.profile.is_pro is False: + if ('public' not in bundle.data or bundle.data['public'] is False): errors['not-pro'] = ("You'll need to go Pro " "(https://snipt.net/pro/) " "in order to create private "