| 13 | is_command_pin_set = serializers.BooleanField(read_only=True) |
| 14 | is_2fa_enabled = serializers.BooleanField(read_only=True) |
| 15 | |
| 16 | class Meta: |
| 17 | model = User |
| 18 | fields = ['is_2fa_enabled', 'is_command_pin_set', 'timezone', 'email_notifications', 'username', 'email', 'units_imperial', 'last_login'] |
| 19 | |
| 20 | class PinChangeSerializer(serializers.Serializer): |
| 21 | otp_code = serializers.RegexField( |
| 22 | required=False, allow_blank=True, max_length=6, regex=r'^[0-9]{6}$' |
| 23 | ) |
no outgoing calls
no test coverage detected