mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-31 14:25:55 +00:00
Fix serialization of empty optional lists
This commit is contained in:
@@ -444,7 +444,7 @@ def start(format: bool = False):
|
||||
sub_type = arg_type.split("<")[1][:-1]
|
||||
|
||||
write_types += "\n "
|
||||
write_types += f"if self.{arg_name}:\n "
|
||||
write_types += f"if self.{arg_name} is not None:\n "
|
||||
write_types += "b.write(Vector(self.{}{}))\n ".format(
|
||||
arg_name, f", {sub_type.title()}" if sub_type in CORE_TYPES else ""
|
||||
)
|
||||
|
Reference in New Issue
Block a user