Commit 646d0ee 1 parent abfe009 commit 646d0ee Copy full SHA for 646d0ee
File tree 3 files changed +3
-9
lines changed
3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,6 @@ def underscore_to_camel(input_: str | int) -> str:
23
23
return re .sub (camelize_re , _underscore_to_camel , input_ )
24
24
25
25
26
- def camel_to_underscore (input : str ) -> str :
27
- """
28
- Convert a string from camelCase to snake_case
29
- """
30
- return re .sub (r"(?<!^)(?=[A-Z])" , "_" , input ).lower ()
31
-
32
-
33
26
def get_from_serializer_data_or_instance (
34
27
field : str , data : Mapping , serializer : Serializer
35
28
) -> Any :
Original file line number Diff line number Diff line change 9
9
from django .db .models .functions import Coalesce , NullIf
10
10
from django .utils .translation import gettext_lazy as _
11
11
12
+ from djangorestframework_camel_case .util import camel_to_underscore
12
13
from zgw_consumers .client import build_client
13
14
14
- from openforms .api .utils import camel_to_underscore
15
15
from openforms .formio .constants import DataSrcOptions
16
16
from openforms .formio .service import rewrite_formio_components
17
17
from openforms .formio .typing import (
Original file line number Diff line number Diff line change 7
7
from datetime import date , datetime
8
8
from typing import assert_never , cast
9
9
10
+ from djangorestframework_camel_case .util import camel_to_underscore
10
11
from glom import Assign , Path , glom
11
12
12
- from openforms .api .utils import camel_to_underscore , underscore_to_camel
13
+ from openforms .api .utils import underscore_to_camel
13
14
from openforms .formio .service import FormioData
14
15
from openforms .formio .typing import Component , EditGridComponent
15
16
from openforms .formio .typing .vanilla import FileComponent
You can’t perform that action at this time.
0 commit comments