diff --git a/swh/deposit/api/common.py b/swh/deposit/api/common.py --- a/swh/deposit/api/common.py +++ b/swh/deposit/api/common.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 The Software Heritage developers +# Copyright (C) 2017-2022 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information @@ -885,6 +885,7 @@ if isinstance(swhid_ref, QualifiedSWHID): deposit.swhid = str(extended_swhid_from_qualified(swhid_ref)) deposit.swhid_context = str(swhid_ref) + deposit.metadata_only = True deposit.complete_date = depo_request.date deposit.reception_date = depo_request.date deposit.save() diff --git a/swh/deposit/migrations/0022_deposit_metadata_only.py b/swh/deposit/migrations/0022_deposit_metadata_only.py new file mode 100644 --- /dev/null +++ b/swh/deposit/migrations/0022_deposit_metadata_only.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.24 on 2022-02-23 10:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("deposit", "0021_deposit_origin_url_20201124_1438"), + ] + + operations = [ + migrations.AddField( + model_name="deposit", + name="metadata_only", + field=models.BooleanField(default=False), + ), + ] diff --git a/swh/deposit/models.py b/swh/deposit/models.py --- a/swh/deposit/models.py +++ b/swh/deposit/models.py @@ -147,6 +147,7 @@ load_task_id = models.TextField( blank=True, null=True, verbose_name="Scheduler's associated loading task id" ) + metadata_only = models.BooleanField(default=False) raw_metadata: Optional[str] = None class Meta: