forked from shaba/openuds
refactoring and updating models for python 3.7 -- os_manager & permissions
This commit is contained in:
parent
377b4542d7
commit
75b470a7d1
@ -45,7 +45,7 @@ from uds.core.services.Exceptions import InvalidServiceException
|
||||
from uds.models.uuid_model import UUIDModel
|
||||
from uds.models.Tag import TaggingMixin
|
||||
|
||||
from uds.models.OSManager import OSManager
|
||||
from uds.models.os_manager import OSManager
|
||||
from uds.models.Service import Service
|
||||
from uds.models.transport import Transport
|
||||
from uds.models.group import Group
|
||||
|
@ -33,7 +33,7 @@
|
||||
import logging
|
||||
|
||||
# Permissions
|
||||
from .Permissions import Permissions
|
||||
from .permissions import Permissions
|
||||
|
||||
# Utility
|
||||
from .util import getSqlDatetime
|
||||
@ -45,7 +45,7 @@ from .Provider import Provider
|
||||
from .Service import Service
|
||||
|
||||
# Os managers
|
||||
from .OSManager import OSManager
|
||||
from .os_manager import OSManager
|
||||
|
||||
# Transports
|
||||
from .transport import Transport
|
||||
|
@ -59,6 +59,9 @@ class OSManager(ManagedObjectModel, TaggingMixin): # type: ignore
|
||||
ordering = ('name',)
|
||||
app_label = 'uds'
|
||||
|
||||
def getInstance(self, values: typing.Optional[typing.Dict[str, str]] = None) -> 'osmanagers.OSManager':
|
||||
return typing.cast('osmanagers.OSManager', super().getInstance(values=values))
|
||||
|
||||
def getType(self) -> typing.Type['osmanagers.OSManager']:
|
||||
"""
|
||||
Get the type of the object this record represents.
|
Loading…
Reference in New Issue
Block a user