Commit 9f2da19c authored by Sebastien Robin's avatar Sebastien Robin

remove the bad hasattr in the checkConstistency script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11386 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e7e5827
...@@ -84,15 +84,14 @@ else:\n ...@@ -84,15 +84,14 @@ else:\n
site = None\n site = None\n
# try to guess site from document if source is defined\n # try to guess site from document if source is defined\n
# XXX useful for unit test\n # XXX useful for unit test\n
if hasattr(transaction, \'source\'):\n site = transaction.getSourceValue()\n
site = transaction.getSourceValue()\n while True:\n
while True:\n if not hasattr(site, \'getVaultTypeList\'):\n
if not hasattr(site, \'getVaultTypeList\'):\n msg = Message(domain = \'ui\', message = \'The site value is misconfigured; report this to system administrators.\')\n
msg = Message(domain = \'ui\', message = \'The site value is misconfigured; report this to system administrators.\')\n raise ValidationFailed, (msg,)\n
raise ValidationFailed, (msg,)\n if \'site\' in site.getVaultTypeList():\n
if \'site\' in site.getVaultTypeList():\n break\n
break\n site = site.getParentValue()\n
site = site.getParentValue()\n
\n \n
if site is None:\n if site is None:\n
msg = Message(domain = \'ui\', message = \'Impossible to determine site for the transaction.\')\n msg = Message(domain = \'ui\', message = \'Impossible to determine site for the transaction.\')\n
...@@ -235,8 +234,8 @@ else:\n ...@@ -235,8 +234,8 @@ else:\n
<string>site</string> <string>site</string>
<string>len</string> <string>len</string>
<string>None</string> <string>None</string>
<string>hasattr</string>
<string>True</string> <string>True</string>
<string>hasattr</string>
<string>msg</string> <string>msg</string>
<string>date</string> <string>date</string>
<string>current_date</string> <string>current_date</string>
......
55 58
\ No newline at end of file \ No newline at end of file
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