minor fixes on versioning, probably due to changes in Python 2.7 and BlueBream
This commit is contained in:
parent
ca8f509748
commit
da24ef6324
2 changed files with 6 additions and 3 deletions
|
@ -264,9 +264,10 @@
|
|||
<label style="display: inline"
|
||||
for="version.create"><span i18n:translate="">
|
||||
New version</span></label>
|
||||
<tal:level condition="python: len(list(view.versionLevels)) > 1">:
|
||||
<tal:level define="versionLevels python:list(view.versionLevels)"
|
||||
condition="python: len(versionLevels) > 1">:
|
||||
<select name="version.level">
|
||||
<option tal:repeat="level view/versionLevels"
|
||||
<option tal:repeat="level versionLevels"
|
||||
i18n:translate=""
|
||||
tal:attributes="value level/token"
|
||||
tal:content="level/label" />
|
||||
|
|
|
@ -168,7 +168,9 @@ class VersionableResource(object):
|
|||
for name in ('data', 'externalAddress',):
|
||||
attrs.remove(name)
|
||||
for attr in attrs:
|
||||
setattr(adaptedObj, attr, getattr(adaptedContext, attr))
|
||||
value = getattr(adaptedContext, attr)
|
||||
if not callable(value):
|
||||
setattr(adaptedObj, attr, value)
|
||||
if IExternalFile.providedBy(adaptedObj):
|
||||
adaptedObj.storageParams = adaptedContext.storageParams
|
||||
adaptedObj.storageName = adaptedContext.storageName
|
||||
|
|
Loading…
Add table
Reference in a new issue