mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Fixed Userfield value assignment handling (/objects/{entity}
API endpoint) (fixes #1572)
This commit is contained in:
parent
3608eec8fb
commit
61a58ddef0
@ -8,4 +8,5 @@
|
|||||||
- Fixed that grouping by columns in tables may caused duplicate groups
|
- Fixed that grouping by columns in tables may caused duplicate groups
|
||||||
- Fixed that grocycode camera barcode scanning didn't recognize the scanned code for chore/battery tracking
|
- Fixed that grocycode camera barcode scanning didn't recognize the scanned code for chore/battery tracking
|
||||||
- Fixed that `missing_products` of the `/stock/volatile` endpoint also returned incactive products
|
- Fixed that `missing_products` of the `/stock/volatile` endpoint also returned incactive products
|
||||||
|
- Fixed that when having multiple Userfields for an entity, the `/objects/{entity}` endpoint returned wrong Userfield values
|
||||||
- Optimized the meal plan page to be properly printable (thanks @MrKrisKrisu)
|
- Optimized the meal plan page to be properly printable (thanks @MrKrisKrisu)
|
||||||
|
@ -161,7 +161,7 @@ class GenericEntityApiController extends BaseApiController
|
|||||||
$userfieldKeyValuePairs = null;
|
$userfieldKeyValuePairs = null;
|
||||||
foreach ($userfields as $userfield)
|
foreach ($userfields as $userfield)
|
||||||
{
|
{
|
||||||
$value = FindObjectInArrayByPropertyValue($allUserfieldValues, 'object_id', $object->id);
|
$value = FindObjectInArrayByPropertyValue(FindAllObjectsInArrayByPropertyValue($allUserfieldValues, 'object_id', $object->id), 'name', $userfield->name);
|
||||||
if ($value)
|
if ($value)
|
||||||
{
|
{
|
||||||
$userfieldKeyValuePairs[$userfield->name] = $value->value;
|
$userfieldKeyValuePairs[$userfield->name] = $value->value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user