During the sorting, PostgreSQL keeps NULL values as first, so filter them out.
I recently found this form is more readable than using \ to break into multiple lines.
\
build = ( session.query(ArtifactBuild) .filter(cls.build_id != None) .order_by(ArtifactBuild.build_id.desc()) .first() )
Looks good for me.
Just a suggestion. That is not a problem actually.
+1
Thanks, didn't know it can work like this :).
rebased onto b81fa03d9cee4f5aca5541a2a3b0beb6816753f2
Commit 3f991537 fixes this pull-request
Pull-Request has been merged by jkaluza
During the sorting, PostgreSQL keeps NULL values as first, so filter them out.