-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from UnitapApp/feature/gastap_dynamic_round_d…
…uration db error permissions
- Loading branch information
Showing
7 changed files
with
68 additions
and
140 deletions.
There are no files selected for viewing
51 changes: 0 additions & 51 deletions
51
permissions/migrations/0006_remove_brightidmeetverification_permission_ptr_and_more.py
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
permissions/migrations/0006_remove_onceperweekverification_permission_ptr_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.0.4 on 2023-10-27 18:29 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('permissions', '0005_onceinalifetimeverification'), | ||
] | ||
|
||
operations = [ | ||
# migrations.RemoveField( | ||
# model_name='onceperweekverification', | ||
# name='permission_ptr', | ||
# ), | ||
migrations.DeleteModel( | ||
name='OncePerMonthVerification', | ||
), | ||
migrations.DeleteModel( | ||
name='OncePerWeekVerification', | ||
), | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
# from rest_framework import serializers | ||
# from rest_polymorphic.serializers import PolymorphicSerializer | ||
from rest_framework import serializers | ||
from rest_polymorphic.serializers import PolymorphicSerializer | ||
|
||
from permissions.models import ( | ||
BrightIDAuraVerification, | ||
BrightIDMeetVerification, | ||
Permission, | ||
) | ||
|
||
# from permissions.models import ( | ||
# Permission, | ||
# BrightIDMeetVerification, | ||
# BrightIDAuraVerification, | ||
# ) | ||
|
||
class PermissionBaseSerializer(serializers.ModelSerializer): | ||
class Meta: | ||
model = Permission | ||
fields = ["id", "name", "description"] | ||
|
||
# class PermissionBaseSerializer(serializers.ModelSerializer): | ||
# class Meta: | ||
# model = Permission | ||
# fields = ["id", "name", "description"] | ||
|
||
class BrightIDMeetVerificationSerializer(PermissionBaseSerializer): | ||
class Meta: | ||
model = BrightIDMeetVerification | ||
fields = ["id", "name", "description"] | ||
|
||
# class BrightIDMeetVerificationSerializer(PermissionBaseSerializer): | ||
# class Meta: | ||
# model = BrightIDMeetVerification | ||
# fields = ["id", "name", "description"] | ||
|
||
class BrightIDAuraVerificationSerializer(PermissionBaseSerializer): | ||
class Meta: | ||
model = BrightIDAuraVerification | ||
fields = ["id", "name", "description"] | ||
|
||
# class BrightIDAuraVerificationSerializer(PermissionBaseSerializer): | ||
# class Meta: | ||
# model = BrightIDAuraVerification | ||
# fields = ["id", "name", "description"] | ||
|
||
|
||
# class PermissionSerializer(PolymorphicSerializer): | ||
# model_serializer_mapping = { | ||
# Permission: PermissionBaseSerializer, | ||
# BrightIDMeetVerification: BrightIDMeetVerificationSerializer, | ||
# BrightIDAuraVerification: BrightIDAuraVerificationSerializer, | ||
# } | ||
class PermissionSerializer(PolymorphicSerializer): | ||
model_serializer_mapping = { | ||
Permission: PermissionBaseSerializer, | ||
BrightIDMeetVerification: BrightIDMeetVerificationSerializer, | ||
BrightIDAuraVerification: BrightIDAuraVerificationSerializer, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.0.4 on 2023-10-27 18:29 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('tokenTap', '0019_alter_constraint_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='constraint', | ||
name='name', | ||
field=models.CharField(choices=[('BrightIDMeetVerification', 'BrightIDMeetVerification'), ('BrightIDAuraVerification', 'BrightIDAuraVerification'), ('OncePerMonthVerification', 'OncePerMonthVerification'), ('OnceInALifeTimeVerification', 'OnceInALifeTimeVerification'), ('OptimismHasClaimedGasInThisRound', 'OptimismHasClaimedGasInThisRound')], max_length=255, unique=True), | ||
), | ||
] |