Skip to content

fix: handle NULL list_id in campaign processing to prevent crash#2908

Open
SriHarsha-23 wants to merge 1 commit intoknadh:masterfrom
SriHarsha-23:fix-null-list-crash
Open

fix: handle NULL list_id in campaign processing to prevent crash#2908
SriHarsha-23 wants to merge 1 commit intoknadh:masterfrom
SriHarsha-23:fix-null-list-crash

Conversation

@SriHarsha-23
Copy link

Description:
Fixes a crash that occurs when NextSubscribers encounters a NULL list_id in the runningCamp struct.

The ListID field was previously defined as int, which caused a sql: Scan error when the database returned a NULL value (e.g. from deleted lists or inconsistent states).

Changes:

Updated runningCamp struct in cmd/manager_store.go: Changed ListID type from int to sql.NullInt64.

Updated NextSubscribers: Added a check for c.ListID.Valid before appending to the list of IDs.

Related Issue:
Closes #2851

@knadh knadh added hodor-review Automated AI code review and removed hodor-review Automated AI code review labels Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"list_id": converting NULL to int is unsupported

2 participants