def get_repository_metadata_by_id(app, id):
    """Get repository metadata from the database"""
    sa_session = app.model.session
    return sa_session.query(app.model.RepositoryMetadata).get(app.security.decode_id(id))