Commit 3b6ceda5 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Initialise result var.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13638 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9f8602b5
...@@ -896,15 +896,18 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin): ...@@ -896,15 +896,18 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
# Start with everything until content - build a dictionary according to the order # Start with everything until content - build a dictionary according to the order
kw = {} kw = {}
for order_id in order_list: for order_id in order_list:
result = None
if order_id not in VALID_ORDER_KEY_LIST: if order_id not in VALID_ORDER_KEY_LIST:
# Prevent security attack or bad preferences # Prevent security attack or bad preferences
raise AttributeError, "%s is not in valid order key list" % order_id raise AttributeError, "%s is not in valid order key list" % order_id
method_id = 'getPropertyDictFrom%s' % convertToUpperCase(order_id) method_id = 'getPropertyDictFrom%s' % convertToUpperCase(order_id)
method = getattr(self, method_id) method = getattr(self, method_id)
if order_id == 'file_name': if order_id == 'file_name':
if file_name is not None: result = method(file_name) if file_name is not None:
result = method(file_name)
elif order_id == 'user_login': elif order_id == 'user_login':
if user_login is not None: result = method(user_login) if user_login is not None:
result = method(user_login)
else: else:
result = method() result = method()
if result is not None: if result is not None:
...@@ -1146,4 +1149,4 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin): ...@@ -1146,4 +1149,4 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
Serious refactoring of Alarm, Periodicity and CalendarPeriod Serious refactoring of Alarm, Periodicity and CalendarPeriod
classes is needed. classes is needed.
""" """
return DateTime() + .1 return DateTime() + 10
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment