The work_submission model's update now reflected in views and logic.
Model for work_submission was modified during GHOP code integration but
was not reflected in views and logic. This commit fixes it.
Fixes Issue 700.
Reviewd by: Lennard de Rijk
--- a/app/soc/modules/ghop/logic/models/task.py Sun Oct 25 21:53:04 2009 -0700
+++ b/app/soc/modules/ghop/logic/models/task.py Sun Oct 25 22:19:41 2009 -0700
@@ -160,8 +160,9 @@
silent: iff True does not call post store methods.
"""
- from soc.modules.ghop.logic.models import comment as ghop_comment_logic
- from soc.modules.ghop.logic.models import work_submission as \
+ from soc.modules.ghop.logic.models.comment import logic as \
+ ghop_comment_logic
+ from soc.modules.ghop.logic.models.work_submission import logic as \
ghop_work_submission_logic
from soc.modules.ghop.models import comment as ghop_comment_model
from soc.modules.ghop.models import work_submission as \
@@ -199,7 +200,7 @@
if not silent:
# call the _onCreate methods for the Comment and WorkSubmission
if comment_entity:
- ghop_comment_logic.logic._onCreate(comment_entity)
+ ghop_comment_logic._onCreate(comment_entity)
if ws_entity:
ghop_work_submission_logic._onCreate(ws_entity)
@@ -262,16 +263,17 @@
For args see base.getFromKeyFieldsOr404().
"""
- from soc.modules.ghop.logic.models import comment as ghop_comment_logic
- from soc.modules.ghop.logic.models import work_submission as \
+ from soc.modules.ghop.logic.models.comment import logic as \
+ ghop_comment_logic
+ from soc.modules.ghop.logic.models.work_submission import logic as \
ghop_work_submission_logic
entity = self.getFromKeyFieldsOr404(fields)
- comment_entities = ghop_comment_logic.logic.getForFields(
+ comment_entities = ghop_comment_logic.getForFields(
ancestors=[entity], order=['created_on'])
- ws_entities = ghop_work_submission_logic.logic.getForFields(
+ ws_entities = ghop_work_submission_logic.getForFields(
ancestors=[entity], order=['submitted_on'])
return entity, comment_entities, ws_entities
--- a/app/soc/modules/ghop/views/models/task.py Sun Oct 25 21:53:04 2009 -0700
+++ b/app/soc/modules/ghop/views/models/task.py Sun Oct 25 22:19:41 2009 -0700
@@ -946,9 +946,8 @@
ws_properties = {
'parent': entity,
- 'link_id': 't%i' % (int(time.time()*100)),
- 'scope_path': entity.key().name(),
- 'scope': entity.scope,
+ 'program': entity.program,
+ 'org': entity.scope,
'user': user_account,
'information': fields['comment'],
'url_to_work': fields['work_submission'],