remove copied user db integrity error
This commit is contained in:
parent
659acc902e
commit
b71a694777
@ -94,14 +94,10 @@ def save_described_file_to_db(describe_form, distribusi_file):
|
||||
distribusi_file.tags = describe_form.searchtags
|
||||
db.session.add(distribusi_file)
|
||||
db.session.commit()
|
||||
except InvalidRequestError:
|
||||
except (InvalidRequestError, IntegrityError):
|
||||
db.session.rollback()
|
||||
describe_form.save.errors.append("Something went wrong!")
|
||||
flash("Something went wrong!", "danger")
|
||||
except IntegrityError:
|
||||
db.session.rollback()
|
||||
describe_form.save.errors.append("User already exists!")
|
||||
flash("User already exists!", "warning")
|
||||
except DataError:
|
||||
db.session.rollback()
|
||||
describe_form.save.errors.append("Invalid Entry")
|
||||
|
Loading…
Reference in New Issue
Block a user