from website.project.taxonomies import Subject
from admin.nodes.serializers import serialize_node


def serialize_preprint(preprint):

    return {
        'id': preprint._id,
        'date_created': preprint.date_created,
        'modified': preprint.date_modified,
        'provider': preprint.provider,
        'node': serialize_node(preprint.node),
        'is_published': preprint.is_published,
        'date_published': preprint.date_published,
        'subjects': serialize_subjects(preprint.subjects),
    }


def serialize_subjects(subjects):
    serialized_subjects = []
    for subject in subjects:
        subject = Subject.load(subject[0])
        serialized_subjects.append({
            'id': subject._id,
            'text': subject.text
        })
    return serialized_subjects

@@ -603,16 +603,50 @@
 bjects:%0A
+        if len(subject) == 1:%0A    
         
@@ -680,16 +680,48 @@
 ect%5B0%5D)%0A
+            if subject:%0A        
         
@@ -757,24 +757,32 @@
             
+  
+      
 'id': subjec
@@ -800,16 +800,24 @@
         
+     
+   
 'text': 
@@ -829,16 +829,24 @@
 ct.text%0A
+        
         

Add a bit of subject error handling just in case