Fix reference to enum value in SQL
Without this we get a runtime crash querying the DB :(
This commit is contained in:
parent
e73dc9dc9b
commit
57eea3a08a
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ func CommunicationsFromOrganization(ctx context.Context, org_id int64) ([]model.
|
||||||
func CommunicationSetStatus(ctx context.Context, txn db.Tx, org_id int64, comm_id int64, status model.Communicationstatus) error {
|
func CommunicationSetStatus(ctx context.Context, txn db.Tx, org_id int64, comm_id int64, status model.Communicationstatus) error {
|
||||||
statement := table.Communication.UPDATE().
|
statement := table.Communication.UPDATE().
|
||||||
SET(
|
SET(
|
||||||
table.Communication.Status.SET(postgres.String(status.String())),
|
table.Communication.Status.SET(postgres.NewEnumValue(status.String())),
|
||||||
).
|
).
|
||||||
WHERE(table.Communication.OrganizationID.EQ(postgres.Int(org_id)).AND(
|
WHERE(table.Communication.OrganizationID.EQ(postgres.Int(org_id)).AND(
|
||||||
table.Communication.ID.EQ(postgres.Int(comm_id))))
|
table.Communication.ID.EQ(postgres.Int(comm_id))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue