diff --git a/apps/accounts/serializers/account/account.py b/apps/accounts/serializers/account/account.py index 8cf92671e..34333cfe4 100644 --- a/apps/accounts/serializers/account/account.py +++ b/apps/accounts/serializers/account/account.py @@ -101,9 +101,10 @@ class AccountSerializer(AccountSerializerCreateMixin, BaseAccountSerializer): class Meta(BaseAccountSerializer.Meta): model = Account - fields = BaseAccountSerializer.Meta.fields \ - + ['su_from', 'asset'] \ - + ['template', 'push_now', 'source'] + fields = BaseAccountSerializer.Meta.fields + [ + 'su_from', 'asset', 'template', + 'push_now', 'source', 'connectivity' + ] extra_kwargs = { **BaseAccountSerializer.Meta.extra_kwargs, 'name': {'required': False, 'allow_null': True}, diff --git a/apps/assets/const/types.py b/apps/assets/const/types.py index 3c0989517..cde7c8aba 100644 --- a/apps/assets/const/types.py +++ b/apps/assets/const/types.py @@ -329,9 +329,8 @@ class AllTypes(ChoicesMixin): internal_platforms.append(d['name']) user_platforms = platform_cls.objects.exclude(name__in=internal_platforms) - user_platforms.update(internal=False) - for platform in user_platforms: print("\t- Update platform: {}".format(platform.name)) platform_data = cls.get_type_default_platform(platform.category, platform.type) cls.create_or_update_by_platform_data(platform.name, platform_data, platform_cls=platform_cls) + user_platforms.update(internal=False)