View Single Post
Old 07-08-2024, 12:37 PM   #689
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Code:
program: 

	if 
		'(In-Progress|Dormant|Abandoned)' in $#fanficstatus
		|| $#fanficstatus=='Oneshot' && $$#pagecount<30)
		|| readstatus()=='read'
	then
		$#admintags

	else
		columnupdate_admintags_readinggoal()
	fi
How does $$#pagecount<30 work with undefined columns?
For numeric comparisons, null (None) values are treated as zero. For string comparisons they have the string value "None".

Your template is using a string comparison (<). I suspect you want a numeric comparison (<#).

The raw_field() function has a default value parameter to use if the field is None. For example, if you want something other than zero for None you could use
Code:
raw_field('#pagecount', 100) <# 30
chaley is offline   Reply With Quote