Skip to content

Commit

Permalink
small typo fix on database types (#577)
Browse files Browse the repository at this point in the history
This is possible typo, because stringedKey value is of type string and database wanted BIGINT
  • Loading branch information
mrbentarikau authored and jogramming committed Dec 22, 2019
1 parent 074f1c8 commit 3675293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions customcommands/tmplextensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func tmplScheduleUniqueCC(ctx *templates.Context) interface{} {

// since this is a unique, remove existing ones
_, err = scheduledmodels.ScheduledEvents(
qm.Where("event_name='cc_delayed_run' AND guild_id = ? AND (data->>'user_key')::bigint = ? AND (data->>'cmd_id')::bigint = ? AND processed = false",
qm.Where("event_name='cc_delayed_run' AND guild_id = ? AND (data->>'user_key')::text = ? AND (data->>'cmd_id')::bigint = ? AND processed = false",
ctx.GS.ID, stringedKey, cmd.LocalID)).DeleteAll(context.Background(), common.PQ)
if err != nil {
return "", err
Expand All @@ -314,7 +314,7 @@ func tmplCancelUniqueCC(ctx *templates.Context) interface{} {

// since this is a unique, remove existing ones
_, err := scheduledmodels.ScheduledEvents(
qm.Where("event_name='cc_delayed_run' AND guild_id = ? AND (data->>'user_key')::bigint = ? AND (data->>'cmd_id')::bigint = ? AND processed = false",
qm.Where("event_name='cc_delayed_run' AND guild_id = ? AND (data->>'user_key')::text = ? AND (data->>'cmd_id')::bigint = ? AND processed = false",
ctx.GS.ID, stringedKey, ccID)).DeleteAll(context.Background(), common.PQ)
if err != nil {
return "", err
Expand Down

0 comments on commit 3675293

Please sign in to comment.