Do not cast bytes to strs
This commit is contained in:
parent
ee886fe5e2
commit
0e038cbb18
|
|
@ -343,7 +343,7 @@ class TextFilePointer(BinaryFilePointer):
|
|||
extension: str = ".txt"
|
||||
|
||||
def prepare(self, data: value_type):
|
||||
if data:
|
||||
if data and not isinstance(data, bytes):
|
||||
return str(data).encode()
|
||||
|
||||
def deserialize(self, value: str, db: TinyDB, recurse: bool = True) -> value_type:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user