Skip to content

Commit

Permalink
Merge branch 'main' into add_discourse_plugin_statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod authored Oct 5, 2023
2 parents 3c41443 + 6d6ffa5 commit 566e856
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/custom_wizard/submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def self.list(wizard, order_by: nil, page: nil)
params[:key] = list_actor_id if list_actor_id

query = PluginStoreRow.where(params)
query = query.order(order_by) if order_by

result = OpenStruct.new(submissions: [], total: nil)

query.each do |record|
Expand Down
2 changes: 1 addition & 1 deletion lib/custom_wizard/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def type
return :none unless subscribed?
return :business if business?
return :standard if standard?
return :community if community?
:community if community?
end

def subscribed?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

it "should return field values, types and labels" do
wizard = CustomWizard::Wizard.create(template_json["id"])
list = CustomWizard::Submission.list(wizard, page: 0)
list = CustomWizard::Submission.list(wizard, page: 0, order_by: 'id')

json_array = ActiveModel::ArraySerializer.new(
list.submissions,
Expand Down

0 comments on commit 566e856

Please sign in to comment.