forked from shaba/openuds
Fixes
This commit is contained in:
parent
d67a1cd70c
commit
03e31f31b1
@ -65,8 +65,8 @@ class Storage:
|
||||
key = self.__getKey(skey)
|
||||
if isinstance(data, str):
|
||||
data = data.encode('utf-8')
|
||||
data = encoders.encode(data, 'base64', asText=True)
|
||||
attr1 = '' if attr1 is None else attr1
|
||||
data = encoders.encodeAsStr(data, 'base64')
|
||||
attr1 = attr1 or ''
|
||||
try:
|
||||
DBStorage.objects.create(owner=self._owner, key=key, data=data, attr1=attr1) # @UndefinedVariable
|
||||
except Exception:
|
||||
|
@ -38,7 +38,7 @@ from uds.core.util.state import State
|
||||
|
||||
# Not imported at runtime, just for type checking
|
||||
if typing.TYPE_CHECKING:
|
||||
from .service import LiveService
|
||||
from . import service
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -55,8 +55,8 @@ class LivePublication(Publication):
|
||||
_templateId: str = ''
|
||||
_state: str = 'r'
|
||||
|
||||
def service(self) -> 'LiveService':
|
||||
return typing.cast('LiveService', super().service())
|
||||
def service(self) -> 'service.LiveService':
|
||||
return typing.cast('service.LiveService', super().service())
|
||||
|
||||
def marshal(self) -> bytes:
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user