From ac6106c9efcb2f465ec437dab706a7dc33348cf9 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Tue, 18 Sep 2018 17:32:00 +0200
Subject: [PATCH] Debug

---
 journals/templates/journals/allocate_orgpubfractions.html | 2 +-
 journals/views.py                                         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/journals/templates/journals/allocate_orgpubfractions.html b/journals/templates/journals/allocate_orgpubfractions.html
index 4cb5b6114..c13f6a55d 100644
--- a/journals/templates/journals/allocate_orgpubfractions.html
+++ b/journals/templates/journals/allocate_orgpubfractions.html
@@ -31,7 +31,7 @@
       {% csrf_token %}
       {{ formset.management_form }}
       <table class="table">
-	{{ formset.as_table }}
+	{{ formset }}
       </table>
       {% if formset.non_form_errors %}
       <h4 class="text-danger">Error: {{ formset.non_form_errors }}</h4>
diff --git a/journals/views.py b/journals/views.py
index 81908799e..e316d9cd8 100644
--- a/journals/views.py
+++ b/journals/views.py
@@ -31,7 +31,7 @@ from django.shortcuts import get_object_or_404, get_list_or_404, render, redirec
 
 from .constants import STATUS_DRAFT, PUBLICATION_PREPUBLISHED
 from .models import Journal, Issue, Publication, Deposit, DOAJDeposit,\
-                    GenericDOIDeposit, PublicationAuthorsTable
+                    GenericDOIDeposit, PublicationAuthorsTable, OrgPubFraction
 from .forms import AbstractJATSForm, FundingInfoForm,\
                    UnregisteredAuthorForm, AuthorsTableOrganizationSelectForm,\
                    CreateMetadataXMLForm, CitationListBibitemsForm,\
@@ -744,7 +744,7 @@ def allocate_orgpubfractions(request, doi_label):
     if not publication.pubfractions.all().exists():
         # Create new OrgPubFraction objects from existing data, spreading weight evenly
         for org in publication.get_organizations():
-            pubfrac = OrbPubFraction(publication=publication,
+            pubfrac = OrgPubFraction(publication=publication,
                                      organization=org, fraction=0)
             pubfrac.save()
     formset = OrgPubFractionsFormSet(request.POST or None,
-- 
GitLab