Skip to content

Commit

Permalink
#2817: Adds issue.doi schema migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromsl committed Sep 9, 2022
1 parent 0b16e18 commit 834c89c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/identifiers/tests/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ def test_issue_doi_auto_assigned(self):
save_setting('Identifiers', 'register_issue_dois', self.journal_one, '')
from events import registration
journal_logic.handle_assign_issue(self.request, self.article_one, [issue])
issue.refresh_from_db()
self.assertTrue(issue.doi)

def test_check_crossref_settings(self):
Expand Down
20 changes: 20 additions & 0 deletions src/journal/migrations/0053_issue_doi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2022-09-08 14:28
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('journal', '0052_issue_display_title'),
]

operations = [
migrations.AddField(
model_name='issue',
name='doi',
field=models.CharField(blank=True, help_text='The DOI (not URL) to be registered for the issue when registering articles part this issue. If you have enabled issue auto-registration in your settings, this field should be ignored', max_length=255, null=True, verbose_name='DOI'),
),
]

0 comments on commit 834c89c

Please # to comment.