mirror of https://github.com/jumpserver/jumpserver
fix: 修改资产、授权创建时的小问题
parent
f633a50f8e
commit
746c6e4242
|
@ -5,7 +5,3 @@ from django.utils.translation import gettext_lazy as _
|
|||
class Protocol(models.Model):
|
||||
name = models.CharField(max_length=32, verbose_name=_("Name"))
|
||||
port = models.IntegerField(verbose_name=_("Port"))
|
||||
|
||||
def save(self, force_insert=False, force_update=False, using=None,
|
||||
update_fields=None):
|
||||
pass
|
||||
|
|
|
@ -111,7 +111,7 @@ class AssetPermissionSerializer(BulkOrgResourceModelSerializer):
|
|||
# 资产
|
||||
assets_to_set = Asset.objects.filter(
|
||||
Q(ip__in=kwargs.get('assets_display')) |
|
||||
Q(hostname__in=kwargs.get('assets_display'))
|
||||
Q(name__in=kwargs.get('assets_display'))
|
||||
).distinct()
|
||||
instance.assets.add(*assets_to_set)
|
||||
# 节点
|
||||
|
|
Loading…
Reference in New Issue