1
0
Fork 0

FIX: use class method as alias for instance method

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-08-23 03:00:14 +05:30
Ursprung e260241dea
Commit 1916335fa9

Datei anzeigen

@ -98,20 +98,20 @@ class CustomWizard::Submission
end
def self.remove(submission)
if submission.present?
user_id = submission.user.id
wizard_id = submission.wizard.id
submission_id = submission.id
submission.remove
end
def remove
if present?
user_id = @user.id
wizard_id = @wizard.id
submission_id = @id
data = PluginStore.get("#{wizard_id}_#{KEY}", user_id)
data.delete_if { |sub| sub["id"] == submission_id }
PluginStore.set("#{wizard_id}_#{KEY}", user_id, data)
end
end
def remove
self.class.remove(self)
end
def self.cleanup_incomplete_submissions(wizard)
user_id = wizard.user.id
all_submissions = list(wizard, user_id: user_id)