Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 6, 2024
1 parent 6a71b74 commit 8fa11fa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions omeroweb/custom_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ def full_clean(self):
initial = self.initial.get(name, field.initial)
value = field.clean(value, initial)
elif isinstance(field, CharField):
if (
value is not None
and isinstance(value, str)
and len(value) > 0
):
value = str(smart_str(value)) # TODO: This is probably a noop now
if value is not None and isinstance(value, str) and len(value) > 0:
value = str(
smart_str(value)
) # TODO: This is probably a noop now
else:
value = field.clean(value)
else:
Expand Down

0 comments on commit 8fa11fa

Please sign in to comment.