minor fix in organize.comment set up

This commit is contained in:
Helmut Merz 2024-11-24 10:13:04 +01:00
parent c0fc7fd464
commit b8ce799b12

View file

@ -1,23 +1,6 @@
# # loops.organize.comment.browser
# Copyright (c) 2014 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
""" """ Definition of view classes and other browser related stuff for comments.
Definition of view classes and other browser related stuff for comments.
""" """
from zope import interface, component from zope import interface, component
@ -176,7 +159,8 @@ class CreateComment(EditObject):
rm = self.view.loopsRoot.getRecordManager() rm = self.view.loopsRoot.getRecordManager()
ts = rm.get('comments') ts = rm.get('comments')
if ts is None: if ts is None:
ts = addObject(rm, TrackingStorage, 'comments', trackFactory=Comment) #ts = addObject(rm, TrackingStorage, 'comments', trackFactory=Comment)
rm['comments'] = ts = TrackingStorage(trackFactory=Comment)
uid = util.getUidForObject(self.object) uid = util.getUidForObject(self.object)
data = dict(subject=subject, text=text) data = dict(subject=subject, text=text)
for k in ('name', 'email'): for k in ('name', 'email'):