Pārlūkot izejas kodu

Fix error missing fields on fixtures (#2378)

Only name is currently taken from DB, other fields are mandatory to generate translations:

      File "/Users/pau/frappe-bench/env/lib/python2.7/site-packages/frappe/translate.py", line 407, in get_messages_from_custom_fields
        if cf['fieldtype'] == 'Selection' and cf.get('options'):
    KeyError: u'fieldtype'
version-14
paurosello pirms 8 gadiem
committed by Rushabh Mehta
vecāks
revīzija
fe5a516673
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      frappe/translate.py

+ 1
- 1
frappe/translate.py Parādīt failu

@@ -392,7 +392,7 @@ def get_messages_from_custom_fields(app_name):

for fixture in fixtures:
if isinstance(fixture, basestring) and fixture == 'Custom Field':
custom_fields = frappe.get_all('Custom Field')
custom_fields = frappe.get_all('Custom Field', fields=['name','label', 'description', 'fieldtype', 'options'])
break
elif isinstance(fixture, dict) and fixture.get('dt', fixture.get('doctype')) == 'Custom Field':
custom_fields.extend(frappe.get_all('Custom Field', filters=fixture.get('filters'),


Notiek ielāde…
Atcelt
Saglabāt