diff --git a/README.md b/README.md index cf2b97ec5..5141bb664 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Jumpserver采纳分布式架构,支持多机房跨区域部署,中心节点 ### License & Copyright -Copyright (c) 2014-2018 Beijing Duizhan Tech, Inc., All rights reserved. +Copyright (c) 2014-2019 Beijing Duizhan Tech, Inc., All rights reserved. Licensed under The GNU General Public License version 2 (GPLv2) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/apps/assets/models/node.py b/apps/assets/models/node.py index 467feb6f9..e5e25c770 100644 --- a/apps/assets/models/node.py +++ b/apps/assets/models/node.py @@ -276,7 +276,8 @@ class Node(OrgModelMixin): @classmethod def default_node(cls): defaults = {'value': 'Default'} - return cls.objects.get_or_create(defaults=defaults, key='1') + obj, created = cls.objects.get_or_create(defaults=defaults, key='1') + return obj def as_tree_node(self): from common.tree import TreeNode