Bonjour Sylvain,
Merci pour ta réponse rapide et désolé pour ma propre réponse tardive, voici le message d'erreur reçu :
SQL (0.2ms) INSERT INTO "notifications" ("notification_type_id", "attached_object_id", "attached_object_type", "receiver_id", "receiver_type", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["notification_type_id", 27], ["attached_object_id", 17], ["attached_object_type", "User"], ["receiver_id", 17], ["receiver_type", "User"], ["created_at", "2019-11-30 02:02:50.201056"], ["updated_at", "2019-11-30 02:02:50.201056"]]
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 29d99cd0-a1e9-432c-896f-a01024431688) to Sidekiq(mailers) with arguments: "NotificationsMailer", "send_mail_by", "deliver_now", gid://fablab/Notification/77
SQL (2.1ms) UPDATE "statistic_profiles" SET "group_id" = $1, "updated_at" = $2 WHERE "statistic_profiles"."id" = $3 [["group_id", 0], ["updated_at", "2019-11-30 02:02:50.205677"], ["id", 11]]
(0.2ms) ROLLBACK
Completed 500 Internal Server Error in 96ms (ActiveRecord: 14.0ms | Elasticsearch: 0.0ms)
ActiveRecord::InvalidForeignKey (PG::ForeignKeyViolation: ERROR: insert or update on table "statistic_profiles" violates foreign key constraint "fk_rails_7cf6dfadf2"
DETAIL: Key (group_id)=(0) is not present in table "groups".
: UPDATE "statistic_profiles" SET "group_id" = $1, "updated_at" = $2 WHERE "statistic_profiles"."id" = $3):
app/models/user.rb:395:in update_statistic_profile'
app/services/members/members_service.rb:21:in
update'
app/controllers/api/members_controller.rb:57:in `update'
Started GET "/api/notifications/polling?last_poll=2019-11-30T02:02:26.719Z" for 92.154.67.62 at 2019-11-30 02:02:57 +0000
Processing by API::NotificationsController#polling as JSON
Parameters: {"last_poll"=>"2019-11-30T02:02:26.719Z"}
User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 ["id", 1] SELECT COUNT(*) FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 ["receiver_id", 1], ["receiver_type", "User"] SELECT COUNT(*) FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 AND "notifications"."is_read" = $3 [["receiver_id", 1], ["receiver_type", "User"], ["is_read", "f"]]
Notification Load (0.6ms) SELECT "notifications".* FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 AND (is_read = false AND created_at >= '2019-11-30T02:02:26.719Z') ORDER BY created_at DESC [["receiver_id", 1], ["receiver_type", "User"]]
Rendered api/notifications/index.json.jbuilder (2.4ms)
Completed 200 OK in 14ms (Views: 3.1ms | ActiveRecord: 2.8ms | Elasticsearch: 0.0ms)
Started GET "/api/notifications/polling?last_poll=2019-11-30T02:02:35.564Z" for 92.154.67.62 at 2019-11-30 02:03:05 +0000
Processing by API::NotificationsController#polling as JSON
Parameters: {"last_poll"=>"2019-11-30T02:02:35.564Z"}
J'ai également copié les messages précédents et suivants pour le contexte
Merci
Fred