Skip to content

Commit

Permalink
Merge pull request #3573 from adryd325/patch-1
Browse files Browse the repository at this point in the history
Don't rename existing collections when running crawldir
  • Loading branch information
stchris committed Jan 30, 2024
2 parents 5318c77 + 7d79d9b commit 5dc9794
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions aleph/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ def get_collection(foreign_id):


def ensure_collection(foreign_id, label):
authz = Authz.from_role(Role.load_cli_user())
config = {
"foreign_id": foreign_id,
"label": label,
}
create_collection(config, authz)
return Collection.by_foreign_id(foreign_id)
collection = Collection.by_foreign_id(foreign_id, deleted=True)
if collection is None:
authz = Authz.from_role(Role.load_cli_user())
config = {
"foreign_id": foreign_id,
"label": label,
}
create_collection(config, authz)
return Collection.by_foreign_id(foreign_id)
return collection


@click.group(cls=FlaskGroup, create_app=create_app)
Expand Down

0 comments on commit 5dc9794

Please sign in to comment.