Skip to content

Commit 9c55b57

Browse files
committed
增加外键的清除按钮
1 parent cf781bb commit 9c55b57

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fast_tmp/site/field.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ def get_control(self, request: Request) -> Control:
371371
)
372372
if not self._field.null: # type: ignore
373373
self._control.required = True
374+
else:
375+
self._control.clearable = True
374376
return self._control
375377

376378
def orm_2_amis(self, value: Any) -> Any:

0 commit comments

Comments
 (0)