'Get all imports by user by recent first'

@staticmethod
def get_imports_by_user(count=50, user_id=None):

    imports = ImportJob.query.filter_by(user=(login.current_user if (not user_id) else int(user_id))).order_by(desc(ImportJob.starts_at)).limit(count).all()
    return imports
