#NEWLINE# @ classmethod #NEWLINE# def get_for_period( cls , master , year , month ) : #NEWLINE# #INDENT# qs = cls . objects . filter ( master = master , year = year , month = month ) #NEWLINE# count = qs . count ( ) #NEWLINE# if ( count > 1 ) : #NEWLINE# #INDENT# qs . delete ( ) #NEWLINE# count = 0 #NEWLINE# #UNINDENT# if ( count == 0 ) : #NEWLINE# #INDENT# return cls ( master = master , year = year , month = month ) #NEWLINE# #UNINDENT# return qs [ 0 ]