set correct edit action
This commit is contained in:
parent
5535ea5fb5
commit
e6909bc6b2
1 changed files with 2 additions and 1 deletions
|
@ -58,6 +58,7 @@ def edit_feature(request, feature_type=None, name=None):
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
# Update/create feature
|
# Update/create feature
|
||||||
commit_type = 'Created' if feature is None else 'Updated'
|
commit_type = 'Created' if feature is None else 'Updated'
|
||||||
|
action = 'create' if feature is None else 'edit'
|
||||||
feature = form.instance
|
feature = form.instance
|
||||||
feature.feature_type = feature_type.name
|
feature.feature_type = feature_type.name
|
||||||
feature.titles = {}
|
feature.titles = {}
|
||||||
|
@ -72,7 +73,7 @@ def edit_feature(request, feature_type=None, name=None):
|
||||||
return render(request, 'editor/feature_success.html', {
|
return render(request, 'editor/feature_success.html', {
|
||||||
'data': signing.dumps({
|
'data': signing.dumps({
|
||||||
'type': 'editor.edit',
|
'type': 'editor.edit',
|
||||||
'action': 'edit',
|
'action': action,
|
||||||
'package_name': feature.package.name,
|
'package_name': feature.package.name,
|
||||||
'commit_id': feature.package.commit_id,
|
'commit_id': feature.package.commit_id,
|
||||||
'commit_msg': commit_msg,
|
'commit_msg': commit_msg,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue