[GH-ISSUE #608] Adding project doesn't work #443

Closed
opened 2026-02-25 23:42:28 +03:00 by kerem · 5 comments
Owner

Originally created by @rafaelorafaelo on GitHub (Feb 11, 2022).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/608

Hi,
I installed healthchecks v1.25.0 as Docker instance from https://hub.docker.com/r/linuxserver/healthchecks. I can't add new project, the result is a Server Error (500) in the browser. I tried sqlite and postgres as database with the same result. With PostgreSQL server I see this error message:

FEHLER:  NULL-Wert in Spalte »owner_id« verletzt Not-Null-Constraint
DETAIL:  Fehlgeschlagene Zeile enthält (2, 5be737bc-16f6-4f99-9899-4f3500230e62, testproject, , , null, 1233456, null, f).
ANWEISUNG:  INSERT INTO "accounts_project" ("code", "name", "owner_id", "api_key", "api_key_readonly", "badge_key", "ping_key", "show_slugs") VALUES ('5be737bc-16f6-4f99-9899-4f3500230e62'::uuid, E'testproject', NULL, E'', E'', E'1233456', NULL, false) RETURNING "accounts_project"."id"

There is a missing owner_id in the SQL statement. In Healthchecks I see a dash as owner on the Add project page. Looks like it should be the current username as shown in the Default Project.

Regards
Ralf

Originally created by @rafaelorafaelo on GitHub (Feb 11, 2022). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/608 Hi, I installed healthchecks v1.25.0 as Docker instance from https://hub.docker.com/r/linuxserver/healthchecks. I can't add new project, the result is a Server Error (500) in the browser. I tried sqlite and postgres as database with the same result. With PostgreSQL server I see this error message: ``` FEHLER: NULL-Wert in Spalte »owner_id« verletzt Not-Null-Constraint DETAIL: Fehlgeschlagene Zeile enthält (2, 5be737bc-16f6-4f99-9899-4f3500230e62, testproject, , , null, 1233456, null, f). ANWEISUNG: INSERT INTO "accounts_project" ("code", "name", "owner_id", "api_key", "api_key_readonly", "badge_key", "ping_key", "show_slugs") VALUES ('5be737bc-16f6-4f99-9899-4f3500230e62'::uuid, E'testproject', NULL, E'', E'', E'1233456', NULL, false) RETURNING "accounts_project"."id" ``` There is a missing owner_id in the SQL statement. In Healthchecks I see a dash as owner on the Add project page. Looks like it should be the current username as shown in the Default Project. Regards Ralf
kerem closed this issue 2026-02-25 23:42:28 +03:00
Author
Owner

@cuu508 commented on GitHub (Feb 11, 2022):

Hi @rafaelorafaelo – are you adding the project through Django admin?

<!-- gh-comment-id:1036505894 --> @cuu508 commented on GitHub (Feb 11, 2022): Hi @rafaelorafaelo – are you adding the project through Django admin?
Author
Owner

@rafaelorafaelo commented on GitHub (Feb 11, 2022):

Hi, what is Django admin, some kind of CLI? No, I add the project through this URL http://abc:8080/admin/accounts/project/add/

<!-- gh-comment-id:1036601686 --> @rafaelorafaelo commented on GitHub (Feb 11, 2022): Hi, what is Django admin, some kind of CLI? No, I add the project through this URL http://abc:8080/admin/accounts/project/add/
Author
Owner

@rafaelorafaelo commented on GitHub (Feb 11, 2022):

Hi, the problem is the Site Administration page under /admin/. If I add a project with the new project wizard on the homepage, everything works. Adding a project via Site Administration fails.

<!-- gh-comment-id:1036650810 --> @rafaelorafaelo commented on GitHub (Feb 11, 2022): Hi, the problem is the Site Administration page under /admin/. If I add a project with the new project wizard on the homepage, everything works. Adding a project via Site Administration fails.
Author
Owner

@cuu508 commented on GitHub (Feb 14, 2022):

If I add a project with the new project wizard on the homepage, everything works.

That's the correct way to add a project.

Adding a project via Site Administration fails.

Don't use the admin interface for normal operations (creating projects, creating checks, creating integrations etc.).

In Healthchecks I see a dash as owner on the Add project page.

I've marked the field as read-only in the admin (here). This field normally renders as a dropdown control with all possible owners (all users in the system). This would slow things down if there are many users, and marking the field as read-only was a quick, simple fix.

<!-- gh-comment-id:1039112384 --> @cuu508 commented on GitHub (Feb 14, 2022): > If I add a project with the new project wizard on the homepage, everything works. That's the correct way to add a project. > Adding a project via Site Administration fails. Don't use the admin interface for normal operations (creating projects, creating checks, creating integrations etc.). > In Healthchecks I see a dash as owner on the Add project page. I've marked the field as read-only in the admin ([here](https://github.com/healthchecks/healthchecks/blob/master/hc/accounts/admin.py#L174)). This field normally renders as a dropdown control with all possible owners (all users in the system). This would slow things down if there are many users, and marking the field as read-only was a quick, simple fix.
Author
Owner

@rafaelorafaelo commented on GitHub (Feb 14, 2022):

Thank's, I got it. Great tool. I've been dreaming of this for years.

<!-- gh-comment-id:1039138772 --> @rafaelorafaelo commented on GitHub (Feb 14, 2022): Thank's, I got it. Great tool. I've been dreaming of this for years.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#443
No description provided.