Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Enforce 49 limit partially

  • Loading branch information...
commit c2c3fbb0057c1fdd1dc13e2c47992f891cefd0ee 1 parent 473a90d
@dustball dustball authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 main.py
View
4 main.py
@@ -215,6 +215,8 @@ def post(self, id):
raise ValueError('Estimated number of people must be a number')
if not int(self.request.get('estimated_size')) > 0:
raise ValueError('Estimated number of people must be greater then zero')
+ if int(self.request.get('estimated_size')) > 47:
+ raise ValueError('Hacker Dojo temporarily is under order of the City of Mountain View to not allow assemblies larger than 49 persons. Sorry, your event exceeds this size. <p>NOTE: Lying about the event size to get around this restriction will result in membership ban plus possible legal action. We will be fined $1500 for each violation, which will be passed on to the event host.')
if ( self.request.get( 'contact_phone' ) and not is_phone_valid( self.request.get( 'contact_phone' ) ) ):
raise ValueError( 'Phone number does not appear to be valid' )
else:
@@ -481,6 +483,8 @@ def post(self):
raise ValueError('Estimated number of people must be a number')
if not int(self.request.get('estimated_size')) > 0:
raise ValueError('Estimated number of people must be greater then zero')
+ if int(self.request.get('estimated_size')) > 47:
+ raise ValueError('Hacker Dojo temporarily is under order of the City of Mountain View to not allow assemblies larger than 49 persons. Sorry, your event exceeds this size. <p>NOTE: Lying about the event size to get around this restriction will result in membership ban plus possible legal action. We will be fined $1500 for each violation, which will be passed on to the event host.')
if (end_time-start_time).days < 0:
raise ValueError('End time must be after start time')
if ( self.request.get( 'contact_phone' ) and not is_phone_valid( self.request.get( 'contact_phone' ) ) ):
Please sign in to comment.
Something went wrong with that request. Please try again.