2
0
Эх сурвалжийг харах

Fixed #31313 -- Fixed is_upperclass() example in enumeration types docs.

Andrey Doroschenko 5 жил өмнө
parent
commit
f1016814d8

+ 4 - 1
docs/ref/models/fields.txt

@@ -204,7 +204,10 @@ choices in a concise way::
         )
 
         def is_upperclass(self):
-            return self.year_in_school in {YearInSchool.JUNIOR, YearInSchool.SENIOR}
+            return self.year_in_school in {
+                self.YearInSchool.JUNIOR,
+                self.YearInSchool.SENIOR,
+            }
 
 These work similar to :mod:`enum` from Python's standard library, but with some
 modifications: