replace invalid q.all.apply calls
parent
3733a86920
commit
382091c726
|
@ -390,14 +390,14 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
|||
|
||||
# Rehash userstories order field
|
||||
# and persist in bulk all changes.
|
||||
promise = @q.all.apply(null, promises).then =>
|
||||
promise = @q.all(promises).then =>
|
||||
items = @.resortUserStories(newSprint.user_stories, "sprint_order")
|
||||
data = @.prepareBulkUpdateData(items, "sprint_order")
|
||||
|
||||
return @rs.userstories.bulkUpdateSprintOrder(project, data).then =>
|
||||
@rs.userstories.bulkUpdateSprintOrder(project, data).then =>
|
||||
@rootscope.$broadcast("sprint:us:moved", us, oldSprintId, newSprintId)
|
||||
|
||||
return @rs.userstories.bulkUpdateBacklogOrder(project, data).then =>
|
||||
@rs.userstories.bulkUpdateBacklogOrder(project, data).then =>
|
||||
for us in usList
|
||||
@rootscope.$broadcast("sprint:us:moved", us, oldSprintId, newSprintId)
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ class RepositoryService extends taiga.Service
|
|||
|
||||
saveAll: (models, patch=true) ->
|
||||
promises = _.map(models, (x) => @.save(x, true))
|
||||
return @q.all.apply(@q, promises)
|
||||
return @q.all(promises)
|
||||
|
||||
save: (model, patch=true) ->
|
||||
defered = @q.defer()
|
||||
|
|
|
@ -86,7 +86,7 @@ class AttachmentsController extends taiga.Controller
|
|||
# Create attachments in bulk
|
||||
createAttachments: (attachments) ->
|
||||
promises = _.map(attachments, (x) => @._createAttachment(x))
|
||||
return @q.all.apply(null, promises).then =>
|
||||
return @q.all(promises).then =>
|
||||
@.updateCounters()
|
||||
|
||||
# Add uploading attachment tracking.
|
||||
|
|
Loading…
Reference in New Issue