mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Merge pull request #8033 from andrej-scinote/aj_SCI_10644
Fix generating of double activities [SCI-10644]
This commit is contained in:
commit
d1c918b68f
2 changed files with 14 additions and 11 deletions
|
@ -57,18 +57,20 @@ class MyModuleTagsController < ApplicationController
|
|||
@mt.created_by = current_user
|
||||
@mt.save
|
||||
|
||||
my_module = @mt.my_module
|
||||
if @mt.valid?
|
||||
my_module = @mt.my_module
|
||||
|
||||
Activities::CreateActivityService
|
||||
.call(activity_type: :add_task_tag,
|
||||
owner: current_user,
|
||||
subject: my_module,
|
||||
project: my_module.project,
|
||||
team: my_module.team,
|
||||
message_items: {
|
||||
my_module: my_module.id,
|
||||
tag: @mt.tag.id
|
||||
})
|
||||
Activities::CreateActivityService
|
||||
.call(activity_type: :add_task_tag,
|
||||
owner: current_user,
|
||||
subject: my_module,
|
||||
project: my_module.project,
|
||||
team: my_module.team,
|
||||
message_items: {
|
||||
my_module: my_module.id,
|
||||
tag: @mt.tag.id
|
||||
})
|
||||
end
|
||||
redirect_to my_module_tags_edit_path(format: :json), turbolinks: false,
|
||||
status: :see_other
|
||||
end
|
||||
|
|
|
@ -67,6 +67,7 @@ window.initDateTimePickerComponent = (id) => {
|
|||
},
|
||||
clearDate() {
|
||||
this.date = null;
|
||||
this.$refs.vueDateTime.manualUpdate = true;
|
||||
this.$refs.vueDateTime.datetime = null;
|
||||
this.$nextTick(() => {
|
||||
if (this.onChange) this.onChange(null);
|
||||
|
|
Loading…
Reference in a new issue