Changeset 3315 for WAeUP_SRP


Ignore:
Timestamp:
11 Mar 2008, 06:34:04 (17 years ago)
Author:
Henrik Bettermann
Message:

In getHeadlineFields wird 'ignore' für import_keys übersprungen jedoch nicht bei den values. Das führt zu einer falschen Zuordnung beim 1.record. Ich habe das geändert, bitte prüfe.

Location:
WAeUP_SRP/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPImport.py

    r3314 r3315  
    140140
    141141    def checkHeadline(self,headline): ###(
    142         """ check the headline of an csv.file """
     142        """ check the headline of a csv file """
    143143        import_keys = [k.strip() for k in headline if not (k.strip().startswith('ignore')
    144144                                                        or k.strip() in self.info.keys())]
     
    152152
    153153    def getHeadlineFields(self,headline,values): ###(
    154         """ check the headline of an csv.file """
    155         import_keys = [k.strip() for k in headline if not (k.strip().startswith('ignore')
    156                                                         or k.strip() in self.info.keys())]
     154        """ check the headline of a csv file """
     155        #import_keys = [k.strip() for k in headline if not (k.strip().startswith('ignore')
     156        #                                                or k.strip() in self.info.keys())]
     157        import_keys = [k.strip() for k in headline]                                                       
    157158        si = set(import_keys)
    158159        ss = set(self.schema.keys())
    159                  
     160
    160161        invalid_keys = si - ss
    161         diff2layout = set(import_keys).difference(set(self.layout.keys()))
     162        #diff2layout = set(import_keys).difference(set(self.layout.keys()))
    162163        keys = []
    163164        i = 0
  • WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt

    r3314 r3315  
    6868              <tr tal:repeat="key row/invalid_keys">
    6969                <td colspan="1">
    70                   <font tal:attributes="color python: test(key[1] == '----','red','black')" tal:content="python: key[0]" />
     70                  <font tal:attributes="color python: test(key[1] == '----' and not key[0].startswith('ignore'),'red','black')" tal:content="python: key[0]" />
    7171                </td>
    7272                <td colspan="1"
Note: See TracChangeset for help on using the changeset viewer.