diff --git a/.github/workflows/plone-package.yml b/.github/workflows/plone-package.yml index 2864464..77d63c5 100644 --- a/.github/workflows/plone-package.yml +++ b/.github/workflows/plone-package.yml @@ -32,7 +32,7 @@ jobs: ~/.cache/pip ~/buildout-cache ~/extends - key: ${{ runner.os }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }} + key: ${{ matrix.python-version }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: @@ -73,7 +73,7 @@ jobs: ~/.cache/pip ~/buildout-cache ~/extends - key: ${{ runner.os }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }} + key: ${{ matrix.python-version }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }} - name: Install system libraries run: apt-get install libxml2-dev libxslt1-dev libjpeg-dev - name: setup buildout cache diff --git a/src/jazkarta/easyformplugin/salesforce/prefill.py b/src/jazkarta/easyformplugin/salesforce/prefill.py index 853969a..6fff47d 100644 --- a/src/jazkarta/easyformplugin/salesforce/prefill.py +++ b/src/jazkarta/easyformplugin/salesforce/prefill.py @@ -1,6 +1,7 @@ from collective.easyform.api import get_actions from collective.easyform.interfaces import IEasyForm from collective.easyform.interfaces import IEasyFormForm +from collective.easyform.fields import superAdapter from dateutil.parser import parse from simple_salesforce import Salesforce from z3c.form.interfaces import IValue @@ -37,9 +38,15 @@ def prefill_value_factory(context, request, view, field, widget): if expr == "form:%s" % field.__name__: return SalesforcePrefillValue(form, field, operation, sf_field) - # Didn't find one, so return None - # so that the IValue adapter lookup continues to the next one - return None + # Didn't find one, fall back to less specific adapter + adapter = superAdapter( + IJazkartaEasyformpluginSalesforceLayer, + prefill_value_factory, + (context, request, view, field, widget), + name="default", + ) + if adapter is not None: + return adapter @implementer(IValue)