From 70b2ec588a6673826c01fa4b34e328c92fc454f6 Mon Sep 17 00:00:00 2001 From: Nil Bacardit Date: Wed, 11 Oct 2023 00:03:03 +0200 Subject: [PATCH] changing the name of the endpoint to sort OrderedDict --- guillotina/contrib/image/api.py | 2 +- guillotina/tests/image/test_field.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guillotina/contrib/image/api.py b/guillotina/contrib/image/api.py index e71b1df58..ecf5794df 100644 --- a/guillotina/contrib/image/api.py +++ b/guillotina/contrib/image/api.py @@ -144,7 +144,7 @@ async def __call__(self): context=IResource, method="PATCH", permission="guillotina.ViewContent", - name="@orderImages/{field_name}", + name="@sort/{field_name}", **_traversed_file_doc("Order the keys of a field"), ) class OrderMultiImage(TraversableFieldService): diff --git a/guillotina/tests/image/test_field.py b/guillotina/tests/image/test_field.py index 1fbc849ec..36ff2fb77 100644 --- a/guillotina/tests/image/test_field.py +++ b/guillotina/tests/image/test_field.py @@ -218,7 +218,7 @@ async def test_multiimage_ordered_field_with_behavior(redis_container, container count += 1 response, status = await requester( - "PATCH", "/db/guillotina/foobar/@orderImages/images", data=json.dumps(["key3", "key2", "key0"]) + "PATCH", "/db/guillotina/foobar/@sort/images", data=json.dumps(["key3", "key2", "key0"]) ) assert status == 200