3👍
✅
You can overwrite the bank
field for your user serializer:
class UserSerializer(serializers.ModelSerializer):
bank = serializers.PrimaryKeyRelatedField(queryset=Bank.objects.filter(opened=True))
class Meta:
model = User
Source:stackexchange.com