(Puppet)-Environments created via hammercli or API doesn't show up in WebUI Org/Location

Hi all,

Problem:
we want to create our (puppet)-environments through the foreman API. This is actually possible but when we define the destiantion location and destination organization it doesn’t represented in the webui under the correct org/location. It is always created unter “any organtization”/“any location”.

hammer puppet-environment update --name mtkr_test1 --location-title "Default Location" --organization-title "Default Organization"

Doesn’t matter if we do it with the hammer CLI or via an API call.

If we take a look via API or hammer CLI we can confirm that our new created environment is in the correct org/location.

hammer puppet-environment info --id 22
Id:            22
Name:          mtkr_test1
Puppetclasses:

Locations:
    Default Location
Organizations:
    Default Organization
Created at:    2021/11/02 09:01:00
Updated at:    2021/11/02 09:01:00

Expected outcome:
The newly created environment(s) are correctly show up in the WebUI.

Foreman and Proxy versions:
2.5.4

What did I wrong?

Regards,
Martin