user.pw_hash = auth_lib.bcrypt_gen_password_hash(
request.form['password'])
user.verification_key = unicode(uuid.uuid4())
- user.save(validate=True)
+ user.save()
# log the user in
request.session['user_id'] = unicode(user.id)
# The key *has* to exist on sql.
return getattr(self, key)
- def save(self, validate=True):
- assert validate
+ def save(self):
sess = object_session(self)
if sess is None:
sess = Session()
entry.pw_hash = auth_lib.bcrypt_gen_password_hash(args.password)
entry.status = u'active'
entry.email_verified = True
- entry.save(validate=True)
+ entry.save()
print "User created (and email marked as verified)"
entry.queued_task_id = task_id
# Save now so we have this data before kicking off processing
- entry.save(validate=True)
+ entry.save()
if request.form.get('callback_url'):
metadata = request.db.ProcessingMetaData()
entry.queued_task_id = task_id
# Save now so we have this data before kicking off processing
- entry.save(validate=True)
+ entry.save()
# Pass off to processing
#
messages.add_message(
request, messages.ERROR, _('You already have a collection called "%s"!' % collection.title))
else:
- collection.save(validate=True)
+ collection.save()
add_message(request, SUCCESS, _('Collection "%s" added!' % collection.title))
collection.description = request.form.get('collection_description')
collection.creator = request.user.id
collection.generate_slug()
- collection.save(validate=True)
+ collection.save()
# Otherwise, use the collection selected from the drop-down
else:
collection_item.media_entry = media.id
collection_item.author = request.user.id
collection_item.note = request.form['note']
- collection_item.save(validate=True)
+ collection_item.save()
collection.items = collection.items + 1
- collection.save(validate=True)
+ collection.save()
media.collected = media.collected + 1
media.save()