(self, db)
return db.query(Link).filter(and_(
            Link.is_custom.is_(False),
            Link.short_code.isnot(None),
            Link.short_code != ''
        )).order_by(Link.id.desc()).first()
Returns latest non custom link
Returns latest non custom link
Returns latest non custom link
def latest_default_link(self, db):
        """Returns latest non custom link"""
        return db.query(Link).filter(and_(
            Link.is_custom.is_(False),
            Link.short_code.isnot(None),
            Link.short_code != ''
        )).order_by(Link.id.desc()).first()
def latest_default_link ( self , db ) : return db . query ( Link ) . filter ( and_ ( Link . is_custom . is_ ( False ) , Link . short_code . isnot ( None ) , Link . short_code != '' ) ) . order_by ( Link . id . desc ( ) ) . first ( )