I have an Event table with fields:
class Event(db.Model):
"""
Event Model
"""
account = db.UserProperty(required=True)
event_id = db.StringProperty(required=True)
Here is the delete function:
@staticmethod
def delete(account,
event_id):
"""Delete Event by event_id
Args:
account - account
event_id - event_id
Raises:
None
"""
if account is not None and event_id is not None:
event = Event.find_by_account_and_event_id(account, event_id)
# if a valid event
if event is not None:
logging.info('DELETING event with event_id = ' + event.event_id + ' account= ' + str(event.account))
event.delete()
I see the following error:
2016-06-15 15:45:45.180 DELETING event with event_id = 2a5e5422-dec5-4e87-a462-e2551e3f3cf8 account= test.user
E 2016-06-15 15:45:45.186 delete() takes exactly 2 arguments (0 given)
FYI: This is from app.yaml:
version: 1
runtime: python27
threadsafe: true
api_version: 1
I am not sure what's wrong here. Any thoughts?