database abstraction killed the perl star

This commit is contained in:
Matthew Connelly 2015-11-14 06:37:29 +00:00
parent 6b01131e87
commit c9889911bb
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ sub GetPaste {
return undef unless $id =~ /^[a-f0-9]*$/; return undef unless $id =~ /^[a-f0-9]*$/;
#This got a bit messy, required because otherwise there are scenarios where an expired paste may still be viewed #This got a bit messy, required because otherwise there are scenarios where an expired paste may still be viewed
return schema->resultset('Paste')->single( { return schema->resultset('Paste')->single( {
-and => [ [ -and =>
{ id => $id }, { id => $id },
{ expiration => { '>=' => DateTimeToQueryable() }, expiration => undef } { expiration => { '>=' => DateTimeToQueryable() }, expiration => undef }
] } ) || undef; ] } ) || undef;