Skip to content

Commit

Permalink
[fc] Repository: plone.app.textfield
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2019-03-14T14:01:09+01:00
Author: Peter Mathis (petschki) <peter.mathis@kombinat.at>
Commit: plone/plone.app.textfield@45832cb

fix python 3 issue in transformer

Files changed:
A news/34.bugfix
M plone/app/textfield/transform.py
Repository: plone.app.textfield

Branch: refs/heads/master
Date: 2019-03-15T14:49:23+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.textfield@17e8874

Merge pull request #35 from plone/issue_34

fix python 3 issue in transformer

Files changed:
A news/34.bugfix
M plone/app/textfield/transform.py
  • Loading branch information
jensens committed Mar 15, 2019
1 parent 51803c3 commit d600bdd
Showing 1 changed file with 16 additions and 30 deletions.
46 changes: 16 additions & 30 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,34 @@
Repository: Products.CMFPlone
Repository: plone.app.textfield


Branch: refs/heads/master
Date: 2019-03-15T10:24:47+01:00
Author: Laurent Lasudry (laulaz) <lasudry@gmail.com>
Commit: https://github.com/plone/Products.CMFPlone/commit/195e5dd68d7b21a9d00cc9910d857d1fd316545f
Date: 2019-03-14T14:01:09+01:00
Author: Peter Mathis (petschki) <peter.mathis@kombinat.at>
Commit: https://github.com/plone/plone.app.textfield/commit/45832cb2cd546ff91bcdc23861907fbc14af035f

Fix indent
fix python 3 issue in transformer

Files changed:
M CHANGES.rst
A news/34.bugfix
M plone/app/textfield/transform.py

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 77ca59fe9..addbe0f74 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -31,7 +31,7 @@ Bug fixes:\n moving `ILanguageSchema` there. [sallner] (#2049)\n - Use correct permission for mail controlpanel form so that Site Administrators\n can also edit. [fredvd] (#2688)\n-- - make linkintegrity robot test more reliable [MrTango] (#2752)\n+- Make linkintegrity robot test more reliable [MrTango] (#2752)\n - Check only once if Products.ATContentTypes is available. [gforcada] (#2765)\n - Fix redirection to `came_from` when url matches LOGIN_TEMPLATE_ID partly\n [petschki] (#2771)\n'
b'diff --git a/news/34.bugfix b/news/34.bugfix\nnew file mode 100644\nindex 0000000..a4aa15d\n--- /dev/null\n+++ b/news/34.bugfix\n@@ -0,0 +1,2 @@\n+fix python 3 issue when checking referenced images in transform\n+[petschki]\ndiff --git a/plone/app/textfield/transform.py b/plone/app/textfield/transform.py\nindex 38ffb13..eb2ecc7 100644\n--- a/plone/app/textfield/transform.py\n+++ b/plone/app/textfield/transform.py\n@@ -111,9 +111,12 @@ def check_referenced_images(self, value, target_mimetype, cache_obj):\n return\n \n # get the original save time from the cached data dict\n- orig_time = getattr(cache_obj, cache._id).values()[0][0]\n- modified_imgs = self.catalog(\n- UID=uids, modified=dict(query=orig_time, range="min"))\n+ cached_values = list(getattr(cache_obj, cache._id, {}).values())\n+ modified_imgs = []\n+ if len(cached_values):\n+ orig_time = cached_values[0][0]\n+ modified_imgs = self.catalog(\n+ UID=uids, modified=dict(query=orig_time, range="min"))\n \n if len(modified_imgs) > 0:\n cache.purgeCache()\n'

Repository: Products.CMFPlone
Repository: plone.app.textfield


Branch: refs/heads/master
Date: 2019-03-15T14:37:01+01:00
Date: 2019-03-15T14:49:23+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/Products.CMFPlone/commit/88df55fb46b5fe2a26414568e9e2e21587991664
Commit: https://github.com/plone/plone.app.textfield/commit/17e8874ed6d0bf53e1d25efa4688924a040a4a4b

Merge branch 'master' into laulaz-patch-1
Merge pull request #35 from plone/issue_34

Files changed:
A news/2516.bugfix
D news/2516.fixed

b'diff --git a/news/2516.fixed b/news/2516.bugfix\nsimilarity index 100%\nrename from news/2516.fixed\nrename to news/2516.bugfix\n'

Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2019-03-15T14:37:39+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/Products.CMFPlone/commit/4263d3eb8544167944a2392137b07bc10a805ff1

Merge pull request #2797 from plone/laulaz-patch-1

Fix indent
fix python 3 issue in transformer

Files changed:
M CHANGES.rst
A news/34.bugfix
M plone/app/textfield/transform.py

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 77ca59fe9..addbe0f74 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -31,7 +31,7 @@ Bug fixes:\n moving `ILanguageSchema` there. [sallner] (#2049)\n - Use correct permission for mail controlpanel form so that Site Administrators\n can also edit. [fredvd] (#2688)\n-- - make linkintegrity robot test more reliable [MrTango] (#2752)\n+- Make linkintegrity robot test more reliable [MrTango] (#2752)\n - Check only once if Products.ATContentTypes is available. [gforcada] (#2765)\n - Fix redirection to `came_from` when url matches LOGIN_TEMPLATE_ID partly\n [petschki] (#2771)\n'
b'diff --git a/news/34.bugfix b/news/34.bugfix\nnew file mode 100644\nindex 0000000..a4aa15d\n--- /dev/null\n+++ b/news/34.bugfix\n@@ -0,0 +1,2 @@\n+fix python 3 issue when checking referenced images in transform\n+[petschki]\ndiff --git a/plone/app/textfield/transform.py b/plone/app/textfield/transform.py\nindex 38ffb13..eb2ecc7 100644\n--- a/plone/app/textfield/transform.py\n+++ b/plone/app/textfield/transform.py\n@@ -111,9 +111,12 @@ def check_referenced_images(self, value, target_mimetype, cache_obj):\n return\n \n # get the original save time from the cached data dict\n- orig_time = getattr(cache_obj, cache._id).values()[0][0]\n- modified_imgs = self.catalog(\n- UID=uids, modified=dict(query=orig_time, range="min"))\n+ cached_values = list(getattr(cache_obj, cache._id, {}).values())\n+ modified_imgs = []\n+ if len(cached_values):\n+ orig_time = cached_values[0][0]\n+ modified_imgs = self.catalog(\n+ UID=uids, modified=dict(query=orig_time, range="min"))\n \n if len(modified_imgs) > 0:\n cache.purgeCache()\n'

0 comments on commit d600bdd

Please sign in to comment.