~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlhelp/management/commands/update_help.py

  • Committer: franku
  • Date: 2018-03-26 16:42:55 UTC
  • mfrom: (486.1.6 fix_encyclopedia)
  • Revision ID: somal@arcor.de-20180326164255-9e3kwgqjnfkgg0kd
Encyclopedia: Fix update_help; Show 'becomes' for workers

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
            # Help
173
173
            workero.help = worker['helptext']
174
174
 
175
 
            # Check for experience
176
 
            if 'experience' in worker:
177
 
                workero.exp = worker['experience']
178
 
 
179
175
            # See what the worker becomes
180
176
            if 'becomes' in worker:
181
177
                try:
182
 
                    enname = worker.becomes
 
178
                    if worker['becomes']['experience']:
 
179
                        workero.exp = worker['becomes']['experience']
 
180
 
 
181
                    # The worker this worker becomes to may wasn't created yet
183
182
                    workero.becomes = WorkerModel.objects.get_or_create(
184
183
                        name=worker['becomes']['name'], tribe=self._to)[0]
185
184
                except: