Skip to content

Commit

Permalink
debug(survey): print sql
Browse files Browse the repository at this point in the history
  • Loading branch information
chillfox committed Feb 21, 2024
1 parent 288d3ab commit 246fff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/placeos-models/survey/invitation.cr
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module PlaceOS::Model
query = query.where(survey_id: survey_id) if survey_id
# can't use `query.where_not(sent: true)` here due to
# sent <> true` not being equivalent to `sent IS NOT true` in PostgreSQL
query = sent ? query.where(sent: true) : query.where("sent IS NOT ?", "TRUE") unless sent.nil?
query = sent ? query.where(sent: true) : query.where("sent IS NOT ?::boolean", true) unless sent.nil?
pp "================================================================================"

Check warning on line 29 in src/placeos-models/survey/invitation.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/DebugCalls

Possibly forgotten debug-related `pp` call detected
Raw output
> pp "================================================================================"
  ^
pp query.to_sql

Check warning on line 30 in src/placeos-models/survey/invitation.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/DebugCalls

Possibly forgotten debug-related `pp` call detected
Raw output
> pp query.to_sql
  ^
pp "================================================================================"

Check warning on line 31 in src/placeos-models/survey/invitation.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/DebugCalls

Possibly forgotten debug-related `pp` call detected
Raw output
> pp "================================================================================"
  ^
Expand Down

0 comments on commit 246fff3

Please sign in to comment.