summaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/admin.py2
-rw-r--r--src/api/models.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/api/admin.py b/src/api/admin.py
index 3d32c78..8b2fcb3 100644
--- a/src/api/admin.py
+++ b/src/api/admin.py
@@ -17,6 +17,7 @@ from api.models import (
HardwareConfig,
NetworkConfig,
SoftwareConfig,
+ AccessConfig,
AccessRelation,
SoftwareRelation,
HostHardwareRelation,
@@ -33,6 +34,7 @@ admin.site.register(OpnfvApiConfig)
admin.site.register(HardwareConfig)
admin.site.register(NetworkConfig)
admin.site.register(SoftwareConfig)
+admin.site.register(AccessConfig)
admin.site.register(AccessRelation)
admin.site.register(SoftwareRelation)
admin.site.register(HostHardwareRelation)
diff --git a/src/api/models.py b/src/api/models.py
index 78ec920..b6bd79f 100644
--- a/src/api/models.py
+++ b/src/api/models.py
@@ -652,7 +652,7 @@ class JobFactory(object):
revoke=False,
job=job,
context={
- "key": user.userprofile.ssh_public_key.read(),
+ "key": user.userprofile.ssh_public_key.open().read().decode(encoding="UTF-8"),
"hosts": [host.labid for host in hosts]
}
)