Project

General

Profile

Bug #31285

responses to /api/v2/settings/<id> no longer contain 'created_at' and 'updated_at' attrs

Added by roman plevka 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Settings
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

foreman-2.3.0-0.7.rc1.el7sat.noarch

The attrs are missing in responses to both GET and PUT requests (and possibly POST too)

2020-11-10T13:03:46 [I|app|12f445d8] Started PUT "/api/v2/settings/discovery_location" for 127.0.0.1 at 2020-11-10 13:03:46 +0100
2020-11-10T13:03:46 [I|app|12f445d8] Processing by Api::V2::SettingsController#update as JSON
2020-11-10T13:03:46 [I|app|12f445d8]   Parameters: {"setting"=>{"value"=>"[FILTERED]"}, "apiv"=>"v2", "id"=>"discovery_location"}
2020-11-10T13:03:46 [D|app|12f445d8] Authenticated user admin against INTERNAL authentication source
2020-11-10T13:03:46 [D|app|12f445d8] Post-login processing for admin
2020-11-10T13:03:46 [I|app|12f445d8] Authorized user admin(Admin User)
2020-11-10T13:03:46 [D|app|12f445d8] Post-login processing for admin
2020-11-10T13:03:47 [D|tax|12f445d8] Current location set to none
2020-11-10T13:03:47 [D|tax|12f445d8] Current organization set to none
2020-11-10T13:03:47 [D|tax|12f445d8] Current location set to none
2020-11-10T13:03:47 [D|tax|12f445d8] Current organization set to none
2020-11-10T13:03:47 [I|app|12f445d8]   Rendering api/v2/settings/update.json.rabl
2020-11-10T13:03:47 [I|app|12f445d8]   Rendered api/v2/settings/update.json.rabl (Duration: 10.0ms | Allocations: 9623)
2020-11-10T13:03:47 [D|app|12f445d8] Body: {"description":"The default location to place discovered hosts in","category":"Setting::Discovered","settings_type":"string","default":"","id":"discovery_location","name":"discovery_location","full_name":"Discovery location","value":"rdrbVOgGL","category_name":"Discovered","readonly":false,"config_file":"settings.yaml","encrypted":false,"select_values":{"Default Location":"Default Location","hSifWeKfZA":"hSifWeKfZA","InvpeNKSWxY":"InvpeNKSWxY","KVKnKAVhOPuN":"KVKnKAVhOPuN","mfHnRd":"mfHnRd","plkDdIVt":"plkDdIVt","pVdbkevdTXD":"pVdbkevdTXD","rdrbVOgGL":"rdrbVOgGL","roCPQxZwGx":"roCPQxZwGx","SPwWAicNZ":"SPwWAicNZ","umgWgPLbmU":"umgWgPLbmU","zEZwsKid":"zEZwsKid"}}


Related issues

Related to Foreman - Refactor #31471: Deprecate setting timestamps in API responsesClosed

Associated revisions

Revision 957a215f (diff)
Added by Ondřej Ezr 5 months ago

Fixes #31285 - setting timestamps for API

Presenter doesn't include Setting timestamps, what resulted in a regressision,
the timestamps were not present for the API responses anymore.
This brings the timestamps back temporarily.

Revision a1d29421 (diff)
Added by Ondřej Ezr 5 months ago

Refs #31285 - use Ruby 1.9 style Hash

History

#1 Updated by The Foreman Bot 5 months ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8186 added

#2 Updated by Ondřej Ezr 5 months ago

  • Related to Refactor #31471: Deprecate setting timestamps in API responses added

#3 Updated by The Foreman Bot 5 months ago

  • Fixed in Releases 2.4.0 added

#4 Updated by The Foreman Bot 5 months ago

  • Pull request https://github.com/theforeman/foreman/pull/8198 added

#5 Updated by Ondřej Ezr 5 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by Tomer Brisker 5 months ago

  • Fixed in Releases 2.3.2 added

Also available in: Atom PDF