mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Change Postgres-specific JSONField to stock Django field
This commit is contained in:
23
netbox/users/migrations/0010_update_jsonfield.py
Normal file
23
netbox/users/migrations/0010_update_jsonfield.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.1b1 on 2020-07-16 16:01
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0009_replicate_permissions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='objectpermission',
|
||||
name='constraints',
|
||||
field=models.JSONField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='userconfig',
|
||||
name='data',
|
||||
field=models.JSONField(default=dict),
|
||||
),
|
||||
]
|
@@ -3,7 +3,7 @@ import os
|
||||
|
||||
from django.contrib.auth.models import Group, User
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.contrib.postgres.fields import ArrayField, JSONField
|
||||
from django.contrib.postgres.fields import ArrayField
|
||||
from django.core.validators import MinLengthValidator
|
||||
from django.db import models
|
||||
from django.db.models.signals import post_save
|
||||
@@ -56,7 +56,7 @@ class UserConfig(models.Model):
|
||||
on_delete=models.CASCADE,
|
||||
related_name='config'
|
||||
)
|
||||
data = JSONField(
|
||||
data = models.JSONField(
|
||||
default=dict
|
||||
)
|
||||
|
||||
@@ -265,7 +265,7 @@ class ObjectPermission(models.Model):
|
||||
base_field=models.CharField(max_length=30),
|
||||
help_text="The list of actions granted by this permission"
|
||||
)
|
||||
constraints = JSONField(
|
||||
constraints = models.JSONField(
|
||||
blank=True,
|
||||
null=True,
|
||||
help_text="Queryset filter matching the applicable objects of the selected type(s)"
|
||||
|
Reference in New Issue
Block a user