#259 Filter-out NULL ArtifactBuild.build_id in get_highest_build_id.
Merged by jkaluza. Opened by jkaluza.
jkaluza/freshmaker event-based-dry-run  into  master

Download 259.patch

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.

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

Pull-Request has been merged by jkaluza

Metadata