Merge branch 'daniel/mr-fix'
diff --git a/app/mapreduce.yaml b/app/mapreduce.yaml
index f6a4521..9cddc61 100644
--- a/app/mapreduce.yaml
+++ b/app/mapreduce.yaml
@@ -287,7 +287,7 @@
 - name: ConvertGradingProjectSurveyRecord
   mapper:
     input_reader: mapreduce.input_readers.DatastoreKeyInputReader
-    handler: soc.mapreduce.ndb_organization.convertProjectSurveyRecordTxn
+    handler: soc.mapreduce.ndb_organization.convertGradingProjectSurveyRecordTxn
     params:
     - name: entity_kind
       value: soc.modules.gsoc.models.grading_project_survey_record.GSoCGradingProjectSurveyRecord
diff --git a/app/soc/mapreduce/ndb_organization.py b/app/soc/mapreduce/ndb_organization.py
index c1ebeb3..b309de7 100644
--- a/app/soc/mapreduce/ndb_organization.py
+++ b/app/soc/mapreduce/ndb_organization.py
@@ -20,6 +20,7 @@
 
 from google.appengine.ext import db
 
+from soc.modules.gsoc.models import grading_project_survey_record as grading_project_survey_record_model
 from soc.modules.gsoc.models import project as project_model
 from soc.modules.gsoc.models import project_survey_record as project_survey_record_model
 from soc.modules.gsoc.models import proposal as proposal_model
@@ -62,3 +63,18 @@
 
   project_survey_record.org = new_key
   project_survey_record.put()
+
+
+@db.transactional
+def convertGradingProjectSurveyRecordTxn(grading_project_survey_recod_key):
+  grading_project_survey_record = (
+      grading_project_survey_record_model.GSoCGradingProjectSurveyRecord
+          .get(grading_project_survey_recod_key))
+
+  new_key = db.Key.from_path(
+      org_model.SOCOrganization._get_kind(),
+      grading_project_survey_record_model.GSoCGradingProjectSurveyRecord.org
+          .get_value_for_datastore(grading_project_survey_record).name())
+
+  grading_project_survey_record.org = new_key
+  grading_project_survey_record.put()
diff --git a/app/soc/modules/gsoc/views/dashboard.py b/app/soc/modules/gsoc/views/dashboard.py
index a99558c..534b963 100644
--- a/app/soc/modules/gsoc/views/dashboard.py
+++ b/app/soc/modules/gsoc/views/dashboard.py
@@ -1139,7 +1139,7 @@
       list_config.addSimpleColumn('name', 'name')
     else:
       def c(ent, s, text):
-        if ent.slots - s == 0:
+        if ent.slot_allocation - s == 0:
           return text
         return """<strong><font color="red">%s</font></strong>""" % text
 
@@ -1151,10 +1151,10 @@
           'slots_used', 'Slots used', lambda ent, s, *args: s)
       list_config.addHtmlColumn(
           'delta', 'Slots difference',
-          lambda ent, s, *args: c(ent, s, (ent.slots - s)))
+          lambda ent, s, *args: c(ent, s, (ent.slot_allocation - s)))
       list_config.addNumericalColumn(
           'delta_sortable', 'Slots difference (sortable)',
-          (lambda ent, s, *args: abs(ent.slots - s)), hidden=True)
+          (lambda ent, s, *args: abs(ent.slot_allocation - s)), hidden=True)
 
     list_config.setDefaultSort('name')
     self._list_config = list_config