DeviceConnection PATCH request extra queries

Created Diff expires in
20 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
13 lines
33 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
26 lines
1. SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > '2025-05-20 10:46:41.030698' AND "django_session"."session_key" = '3gcbdx9682ttgo86d6dogbfyn6k5zhk1') LIMIT 21
1. SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > '2025-05-20 10:44:48.183493' AND "django_session"."session_key" = 'tfufglhnb2dakb8ipa1oiou5ubquxxu2') LIMIT 21
2. SELECT "openwisp_users_user"."password", "openwisp_users_user"."last_login", "openwisp_users_user"."is_superuser", "openwisp_users_user"."username", "openwisp_users_user"."first_name", "openwisp_users_user"."last_name", "openwisp_users_user"."is_staff", "openwisp_users_user"."is_active", "openwisp_users_user"."date_joined", "openwisp_users_user"."id", "openwisp_users_user"."email", "openwisp_users_user"."bio", "openwisp_users_user"."url", "openwisp_users_user"."company", "openwisp_users_user"."location", "openwisp_users_user"."phone_number", "openwisp_users_user"."birth_date", "openwisp_users_user"."notes", "openwisp_users_user"."language", "openwisp_users_user"."password_updated" FROM "openwisp_users_user" WHERE "openwisp_users_user"."id" = '63b6ec7d0c904fbb90a9376380318fde' LIMIT 21
2. SELECT "openwisp_users_user"."password", "openwisp_users_user"."last_login", "openwisp_users_user"."is_superuser", "openwisp_users_user"."username", "openwisp_users_user"."first_name", "openwisp_users_user"."last_name", "openwisp_users_user"."is_staff", "openwisp_users_user"."is_active", "openwisp_users_user"."date_joined", "openwisp_users_user"."id", "openwisp_users_user"."email", "openwisp_users_user"."bio", "openwisp_users_user"."url", "openwisp_users_user"."company", "openwisp_users_user"."location", "openwisp_users_user"."phone_number", "openwisp_users_user"."birth_date", "openwisp_users_user"."notes", "openwisp_users_user"."language", "openwisp_users_user"."password_updated" FROM "openwisp_users_user" WHERE "openwisp_users_user"."id" = '5b4b18896cc447e5a6d037e2b4589af1' LIMIT 21
3. SELECT "config_device"."id", "config_device"."created", "config_device"."modified", "config_device"."organization_id", "config_device"."name", "config_device"."mac_address", "config_device"."key", "config_device"."model", "config_device"."os", "config_device"."system", "config_device"."notes", "config_device"."group_id", "config_device"."last_ip", "config_device"."management_ip", "config_device"."hardware_id", "config_device"."_is_deactivated" FROM "config_device" WHERE "config_device"."id" = 'cbfdf4fb1aa44ce3b8b36719bc8ca971' LIMIT 1
3. SELECT "config_device"."id", "config_device"."created", "config_device"."modified", "config_device"."organization_id", "config_device"."name", "config_device"."mac_address", "config_device"."key", "config_device"."model", "config_device"."os", "config_device"."system", "config_device"."notes", "config_device"."group_id", "config_device"."last_ip", "config_device"."management_ip", "config_device"."hardware_id", "config_device"."_is_deactivated" FROM "config_device" WHERE "config_device"."id" = '7aef11e12d1f4607854dbe678f56d9a9' LIMIT 1
4. SELECT 1 AS "a" FROM "config_device" WHERE "config_device"."id" = 'cbfdf4fb1aa44ce3b8b36719bc8ca971' LIMIT 1
4. SELECT 1 AS "a" FROM "config_device" WHERE "config_device"."id" = '7aef11e12d1f4607854dbe678f56d9a9' LIMIT 1
5. SELECT "connection_deviceconnection"."id", "connection_deviceconnection"."created", "connection_deviceconnection"."modified", "connection_deviceconnection"."device_id", "connection_deviceconnection"."credentials_id", "connection_deviceconnection"."update_strategy", "connection_deviceconnection"."enabled", "connection_deviceconnection"."params", "connection_deviceconnection"."is_working", "connection_deviceconnection"."failure_reason", "connection_deviceconnection"."last_attempt" FROM "connection_deviceconnection" WHERE "connection_deviceconnection"."id" = '4b6c00c075544d18a49f1eecb94651fe' LIMIT 21
5. SELECT "connection_deviceconnection"."id", "connection_deviceconnection"."created", "connection_deviceconnection"."modified", "connection_deviceconnection"."device_id", "connection_deviceconnection"."credentials_id", "connection_deviceconnection"."update_strategy", "connection_deviceconnection"."enabled", "connection_deviceconnection"."params", "connection_deviceconnection"."is_working", "connection_deviceconnection"."failure_reason", "connection_deviceconnection"."last_attempt" FROM "connection_deviceconnection" WHERE "connection_deviceconnection"."id" = '7447d98fe12f481db74b846d16cc12a1' LIMIT 21
6. SELECT "config_device"."id", "config_device"."created", "config_device"."modified", "config_device"."organization_id", "config_device"."name", "config_device"."mac_address", "config_device"."key", "config_device"."model", "config_device"."os", "config_device"."system", "config_device"."notes", "config_device"."group_id", "config_device"."last_ip", "config_device"."management_ip", "config_device"."hardware_id", "config_device"."_is_deactivated" FROM "config_device" WHERE "config_device"."id" = 'cbfdf4fb1aa44ce3b8b36719bc8ca971'
6. SELECT "config_device"."id", "config_device"."created", "config_device"."modified", "config_device"."organization_id", "config_device"."name", "config_device"."mac_address", "config_device"."key", "config_device"."model", "config_device"."os", "config_device"."system", "config_device"."notes", "config_device"."group_id", "config_device"."last_ip", "config_device"."management_ip", "config_device"."hardware_id", "config_device"."_is_deactivated" FROM "config_device" WHERE "config_device"."id" = '7aef11e12d1f4607854dbe678f56d9a9'
7. SELECT 1 AS "a" FROM "config_device" WHERE "config_device"."id" = 'cbfdf4fb1aa44ce3b8b36719bc8ca971' LIMIT 1
7. SELECT 1 AS "a" FROM "config_device" WHERE "config_device"."id" = '7aef11e12d1f4607854dbe678f56d9a9' LIMIT 1
8. SELECT 1 AS "a" FROM "connection_credentials" WHERE "connection_credentials"."id" = 'd6623f8932c246859dc5dd6bf7641f9c' LIMIT 1
8. SELECT 1 AS "a" FROM "connection_credentials" WHERE "connection_credentials"."id" = '88d10948b174425f8e6a7fb6890ae8f6' LIMIT 1
9. SELECT "connection_credentials"."id", "connection_credentials"."created", "connection_credentials"."modified", "connection_credentials"."name", "connection_credentials"."organization_id", "connection_credentials"."connector", "connection_credentials"."params", "connection_credentials"."auto_add" FROM "connection_credentials" WHERE "connection_credentials"."id" = 'd6623f8932c246859dc5dd6bf7641f9c' LIMIT 21
9. SELECT "connection_credentials"."id", "connection_credentials"."created", "connection_credentials"."modified", "connection_credentials"."name", "connection_credentials"."organization_id", "connection_credentials"."connector", "connection_credentials"."params", "connection_credentials"."auto_add" FROM "connection_credentials" WHERE "connection_credentials"."id" = '88d10948b174425f8e6a7fb6890ae8f6' LIMIT 21
10. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '7823007a0bab430f83c013a60756a0db' LIMIT 21
10. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '4ac1f28d46d94f09b8f6492a895f0920' LIMIT 21
11. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '7823007a0bab430f83c013a60756a0db' LIMIT 21
11. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '4ac1f28d46d94f09b8f6492a895f0920' LIMIT 21
12. SELECT 1 AS "a" FROM "connection_deviceconnection" WHERE ("connection_deviceconnection"."credentials_id" = 'd6623f8932c246859dc5dd6bf7641f9c' AND "connection_deviceconnection"."device_id" = 'cbfdf4fb1aa44ce3b8b36719bc8ca971' AND NOT ("connection_deviceconnection"."id" = '4b6c00c075544d18a49f1eecb94651fe')) LIMIT 1
12. SELECT 1 AS "a" FROM "connection_deviceconnection" WHERE ("connection_deviceconnection"."credentials_id" = '88d10948b174425f8e6a7fb6890ae8f6' AND "connection_deviceconnection"."device_id" = '7aef11e12d1f4607854dbe678f56d9a9' AND NOT ("connection_deviceconnection"."id" = '7447d98fe12f481db74b846d16cc12a1')) LIMIT 1
13. UPDATE "connection_deviceconnection" SET "created" = '2025-05-20 10:46:41.025133', "modified" = '2025-05-20 10:46:41.040191', "device_id" = 'cbfdf4fb1aa44ce3b8b36719bc8ca971', "credentials_id" = 'd6623f8932c246859dc5dd6bf7641f9c', "update_strategy" = 'openwisp_controller.connection.connectors.openwrt.ssh.OpenWisp1', "enabled" = 1, "params" = '{}', "is_working" = NULL, "failure_reason" = '', "last_attempt" = NULL WHERE "connection_deviceconnection"."id" = '4b6c00c075544d18a49f1eecb94651fe'
13. UPDATE "connection_deviceconnection" SET "created" = '2025-05-20 10:44:48.174246', "modified" = '2025-05-20 10:44:48.192322', "device_id" = '7aef11e12d1f4607854dbe678f56d9a9', "credentials_id" = '88d10948b174425f8e6a7fb6890ae8f6', "update_strategy" = 'openwisp_controller.connection.connectors.openwrt.ssh.OpenWisp1', "enabled" = 1, "params" = '{}', "is_working" = NULL, "failure_reason" = '', "last_attempt" = NULL WHERE "connection_deviceconnection"."id" = '7447d98fe12f481db74b846d16cc12a1'
14. SELECT "django_content_type"."id", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."app_label" = 'config' AND "django_content_type"."model" = 'device') LIMIT 21
15. SELECT "config_config"."id", "config_config"."created", "config_config"."modified", "config_config"."backend", "config_config"."config", "config_config"."device_id", "config_config"."status", "config_config"."error_reason", "config_config"."context" FROM "config_config" WHERE "config_config"."device_id" = '7aef11e12d1f4607854dbe678f56d9a9' LIMIT 21
16. SELECT "django_content_type"."id", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."app_label" = 'config' AND "django_content_type"."model" = 'config') LIMIT 21
17. SELECT "config_template"."id" FROM "config_template" INNER JOIN "config_config_templates" ON ("config_template"."id" = "config_config_templates"."template_id") WHERE "config_config_templates"."config_id" = '0b0164d189094b7c8383e31688fc39a8' ORDER BY ("config_config_templates".sort_value) ASC
18. SELECT "geo_devicelocation"."id", "geo_devicelocation"."created", "geo_devicelocation"."modified", "geo_devicelocation"."indoor", "geo_devicelocation"."content_object_id", "geo_devicelocation"."location_id", "geo_devicelocation"."floorplan_id" FROM "geo_devicelocation" WHERE "geo_devicelocation"."content_object_id" = '7aef11e12d1f4607854dbe678f56d9a9' LIMIT 21
19. SELECT "connection_deviceconnection"."id", "connection_deviceconnection"."created", "connection_deviceconnection"."modified", "connection_deviceconnection"."device_id", "connection_deviceconnection"."credentials_id", "connection_deviceconnection"."update_strategy", "connection_deviceconnection"."enabled", "connection_deviceconnection"."params", "connection_deviceconnection"."is_working", "connection_deviceconnection"."failure_reason", "connection_deviceconnection"."last_attempt" FROM "connection_deviceconnection" WHERE "connection_deviceconnection"."device_id" = '7aef11e12d1f4607854dbe678f56d9a9'
20. SELECT "connection_deviceconnection"."id" AS "pk" FROM "connection_deviceconnection" WHERE "connection_deviceconnection"."id" IN ('7447d98fe12f481db74b846d16cc12a1')
21. SELECT "config_device"."id" AS "pk" FROM "config_device" WHERE "config_device"."id" IN ('7aef11e12d1f4607854dbe678f56d9a9')
22. SELECT "config_config"."id" AS "pk" FROM "config_config" WHERE "config_config"."id" IN ('0b0164d189094b7c8383e31688fc39a8')
23. INSERT INTO "reversion_revision" ("date_created", "user_id", "comment") VALUES ('2025-05-20 10:44:48.183435', '5b4b18896cc447e5a6d037e2b4589af1', 'API request: PATCH /api/v1/controller/device/7aef11e1-2d1f-4607-854d-be678f56d9a9/connection/7447d98f-e12f-481d-b74b-846d16cc12a1/')
24. INSERT INTO "reversion_version" ("revision_id", "object_id", "content_type_id", "db", "format", "serialized_data", "object_repr") VALUES (1, '7447d98f-e12f-481d-b74b-846d16cc12a1', 29, 'default', 'json', '[{"model": "connection.deviceconnection", "pk": "7447d98f-e12f-481d-b74b-846d16cc12a1", "fields": {"created": "2025-05-20T10:44:48.174Z", "modified": "2025-05-20T10:44:48.192Z", "device": "7aef11e1-2d1f-4607-854d-be678f56d9a9", "credentials": "88d10948-b174-425f-8e6a-7fb6890ae8f6", "update_strategy": "openwisp_controller.connection.connectors.openwrt.ssh.OpenWisp1", "enabled": true, "params": "{}", "is_working": null, "failure_reason": "", "last_attempt": null}}]', 'DeviceConnection object (7447d98f-e12f-481d-b74b-846d16cc12a1)')
25. INSERT INTO "reversion_version" ("revision_id", "object_id", "content_type_id", "db", "format", "serialized_data", "object_repr") VALUES (1, '7aef11e1-2d1f-4607-854d-be678f56d9a9', 23, 'default', 'json', '[{"model": "config.device", "pk": "7aef11e1-2d1f-4607-854d-be678f56d9a9", "fields": {"created": "2025-05-20T10:44:48.159Z", "modified": "2025-05-20T10:44:48.159Z", "organization": "4ac1f28d-46d9-4f09-b8f6-492a895f0920", "name": "default.test.device", "mac_address": "00:11:22:33:44:55", "key": "lWOkJbimhygMorr0mE4qT6VJGBkopAfu", "model": "TP-Link TL-WDR4300 v1", "os": "LEDE Reboot 17.01-SNAPSHOT r3313-c2999ef", "system": "", "notes": "", "group": null, "last_ip": "127.0.0.1", "management_ip": "127.0.0.1", "hardware_id": "e10c96073eb74850b7244ad90d2963c6", "_is_deactivated": false}}]', 'default.test.device')
26. INSERT INTO "reversion_version" ("revision_id", "object_id", "content_type_id", "db", "format", "serialized_data", "object_repr") VALUES (1, '0b0164d1-8909-4b7c-8383-e31688fc39a8', 16, 'default', 'json', '[{"model": "config.config", "pk": "0b0164d1-8909-4b7c-8383-e31688fc39a8", "fields": {"created": "2025-05-20T10:44:48.163Z", "modified": "2025-05-20T10:44:48.163Z", "backend": "netjsonconfig.OpenWrt", "config": "{\n \"general\": {}\n}", "device": "7aef11e1-2d1f-4607-854d-be678f56d9a9", "status": "modified", "error_reason": "", "context": "{}", "templates": []}}]', 'default.test.device')