Skip to content

Commit

Permalink
Comment how quota_buckets_definitions work
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasgarciaisaia committed Jul 25, 2024
1 parent bd69839 commit 30675ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ask_web/controllers/survey_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ defmodule AskWeb.SurveyController do
fn %{id: questionnaire_id, snapshot_of: original_questionnaire_id} -> original_questionnaire_id || questionnaire_id end
)

# Duplicate the buckets without their counts and quotas
# This is because duplicate surveys will have different respondent groups,
# implying different quotas - and no current counts
defp quota_buckets_definitions(quota_buckets), do:
Enum.map(quota_buckets, fn %{condition: condition} ->
%QuotaBucket{condition: condition}
Expand Down

0 comments on commit 30675ec

Please sign in to comment.