Skip to content

Commit a9be8fb

Browse files
committed
fix: check that staff id doesn't already exist
1 parent 6361da9 commit a9be8fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/invenflask/app.py

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ def staff_create():
184184
flash('Missing Name information')
185185
elif not staff_title:
186186
flash('Missing Staff Title')
187+
elif staff_id == get_staff(staff_id)['id']:
188+
flash('Staff ID already exists. Try again.')
187189
else:
188190
# if auto_gen == 'on':
189191
# last_staff = conn.execute(

0 commit comments

Comments
 (0)