Skip to content

Commit d027c6c

Browse files
authored
Merge pull request #66 from workfloworchestrator/quick-bugfix
Quick bugfix
2 parents 115adf7 + 46b7fdb commit d027c6c

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

backend/main.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,6 @@ class Person2(BaseModel):
159159
]
160160

161161

162-
def is_maurits(val: str) -> bool:
163-
if val != "Maurits":
164-
raise ValueError("Has to be Maurits!")
165-
return True
166-
167-
168-
StringExample = Annotated[str, Predicate(is_maurits)]
169-
170-
171162
@app.post("/form")
172163
async def form(form_data: list[dict] = []):
173164
def form_generator(state: State):
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'pydantic-forms': patch
3+
---
4+
5+
Bugfix

frontend/packages/pydantic-forms/src/components/fields/IntegerField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { isObject } from 'lodash';
3+
import _ from 'lodash';
44

55
import type { PydanticFormControlledElementProps } from '@/types';
66

@@ -19,7 +19,7 @@ export const IntegerField = ({
1919
}}
2020
disabled={disabled}
2121
// Value will be an object when it is added by an array field. We do this be able to add more than one empty field
22-
value={isObject(value) ? undefined : value}
22+
value={_.isObject(value) ? undefined : value}
2323
type="number"
2424
style={{
2525
padding: '8px',

frontend/packages/pydantic-forms/src/components/fields/TextField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
import React from 'react';
77

8-
import { isObject } from 'lodash';
8+
import _ from 'lodash';
99

1010
import { PydanticFormControlledElementProps } from '@/types';
1111

@@ -22,7 +22,7 @@ export const TextField = ({
2222
}}
2323
disabled={disabled}
2424
// Value will be an object when it is added by an array field. We do this be able to add more than one empty field
25-
value={isObject(value) ? '' : value}
25+
value={_.isObject(value) ? '' : value}
2626
type="text"
2727
style={{
2828
padding: '8px',

frontend/packages/pydantic-forms/src/messages/translationsProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import type { ReactNode } from 'react';
33

4-
import { merge } from 'lodash';
4+
import _ from 'lodash';
55
import { IntlErrorCode, NextIntlClientProvider } from 'next-intl';
66

77
import { TranslationsJSON } from '@/types';
@@ -50,7 +50,7 @@ export const TranslationsProvider = ({
5050
}
5151
};
5252

53-
const messages = merge(localMessages, customTranslations);
53+
const messages = _.merge(localMessages, customTranslations);
5454

5555
return (
5656
<NextIntlClientProvider

0 commit comments

Comments
 (0)