Skip to content

Commit

Permalink
Merge pull request #124 from UnitapApp/develop
Browse files Browse the repository at this point in the history
Fix prizetap
  • Loading branch information
ShayanShiravani authored Sep 16, 2023
2 parents 3924713 + 24e2f1f commit 91590a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prizetap/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
from authentication.serializers import SimpleProfilerSerializer
from faucet.serializers import SmallChainSerializer
from .models import *
from .constants import *

class ConstraintSerializer(UserConstraintBaseSerializer, serializers.ModelSerializer):
class Meta(UserConstraintBaseSerializer.Meta):
ref_name = "RaffleConstraint"
model = Constraint

def get_params(self, constraint: UserConstraint):
c_class: ConstraintVerification = eval(constraint.name)
return [p.value for p in c_class.param_keys()]

class SimpleRaffleSerializer(serializers.ModelSerializer):
class Meta:
model = Raffle
Expand Down

0 comments on commit 91590a9

Please sign in to comment.