mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-20 17:50:16 -04:00
fix(profile): use isinstance instead of type
This commit is contained in:
parent
23cda5d64d
commit
5d4613b44f
|
@ -28,7 +28,7 @@ class ProfilePublishForm(forms.ModelForm):
|
|||
# Check the GPA: 0.0 <= GPA <= 5.0
|
||||
if cleaned_data.get("GPA"):
|
||||
gpa = cleaned_data.get("GPA")
|
||||
assert type(gpa) is float
|
||||
assert isinstance(gpa, float)
|
||||
if not 0.0 <= gpa <= 5.0:
|
||||
self.add_error("GPA", "This is not a valid GPA")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user