Include action type on message
This commit is contained in:
parent
aeb765dcd7
commit
f1a78e23f6
|
@ -301,10 +301,8 @@ class NewActionView(View):
|
||||||
next_url = url_for('inventory.devices.lotdevicelist', lot_id=lot_id)
|
next_url = url_for('inventory.devices.lotdevicelist', lot_id=lot_id)
|
||||||
|
|
||||||
if self.form.validate_on_submit():
|
if self.form.validate_on_submit():
|
||||||
self.form.save()
|
instance = self.form.save()
|
||||||
|
messages.success('Action "{}" created successfully!'.format(instance.type))
|
||||||
# TODO(@slamora): include details of created action
|
|
||||||
messages.success('Action created!')
|
|
||||||
return flask.redirect(next_url)
|
return flask.redirect(next_url)
|
||||||
|
|
||||||
|
|
||||||
|
@ -321,7 +319,8 @@ class NewAllocateView(NewActionView, DeviceListMix):
|
||||||
next_url = url_for('inventory.devices.lotdevicelist', lot_id=lot_id)
|
next_url = url_for('inventory.devices.lotdevicelist', lot_id=lot_id)
|
||||||
|
|
||||||
if self.form.validate_on_submit():
|
if self.form.validate_on_submit():
|
||||||
self.form.save()
|
instance = self.form.save()
|
||||||
|
messages.success('Action "{}" created successfully!'.format(instance.type))
|
||||||
return flask.redirect(next_url)
|
return flask.redirect(next_url)
|
||||||
|
|
||||||
self.get_context(lot_id)
|
self.get_context(lot_id)
|
||||||
|
|
Reference in a new issue