Actions
Bug #28777
closedProducts-API has no result for sync_summary
Description
For some reason calling sync_summary
on a product gives a result (when using rails-console) but is always empty when called by the API-controller.
The reason is in last_repo_sync_task_group
, where the Time format used to find the Tasks differs between rails-console and rails-controller:
OK (rails-console):
Katello::Product.find(1).sync_summary
# => { 'warning' => 2, 'success' => 1 }
Katello::Product.find(1).last_repo_sync_task.started_at
# => 2020-01-15 09:49:44 UTC
NOK (added log in Prodcts API-Controller):
@product.sync_summary
# => {}
@product.last_repo_sync_task.started_at
# => 2020-01-15 10:49:44 +0100
The where
-statement that is actually used to get the tasks does not return anything in the latter case.
Actions