Skip to content

Commit

Permalink
Component._encoding: only skip factory for natives
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Stupp <[email protected]>
  • Loading branch information
Zocker1999NET committed Sep 24, 2023
1 parent 392deb6 commit 61ed4d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/icalendar/cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@ def _encode(name, value, parameters=None, encode=1):
return value
if isinstance(value, types_factory.all_types):
# Don't encode already encoded values.
return value
klass = types_factory.for_property(name)
obj = klass(value)
obj = value
else:
klass = types_factory.for_property(name)
obj = klass(value)
if parameters:
if isinstance(parameters, dict):
params = Parameters()
Expand Down

0 comments on commit 61ed4d7

Please sign in to comment.