Because of how Python3 changed how it handled strings,
the byte string read from the user's keyfile was not directly
serializable. This decodes the bytes into a unicode string, assuming UTF-8 encoding.
Change-Id: I5f723a61fb577fa6d4e76e701ef529521ab389ba
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
HardwareConfig,
NetworkConfig,
SoftwareConfig,
+ AccessConfig,
AccessRelation,
SoftwareRelation,
HostHardwareRelation,
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)
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]
}
)