Skip to content

Source Field incorrectly escapes %% #2008

@deanknudsondowner

Description

@deanknudsondowner

I have a field

rh_av = fields.FloatField(source_field="RH%%_Av", null=True)

Actual field name is RH%_Av % has been escaped for obvious reasons. This was working fine when I was using djangos orm.

When this field is present in the table definition it prevents any data loading. I just receive attribute not found errors on any member access. Table works fine when it has been removed. This is an existing table that is unmanaged by the orm.

SQL generated from a table is as:

SELECT AirTemp2_Inst,AirTemp1_Inst,Precip1_Day,Lysim1_Run24hr,Wind1GustDay1s,Wind1GustDayDir1s,Wind1Lull3s,SDWD_Yam,IR_SnowSurfTemp,DewPoint_Av,Wind1GustDir3s,Precip1_SinceLastStorm,AirTemp1_MinObs,Wind1WindChill_10MinAvg,Wind1GustDayDir3s,AP1_CPressure,Wind1LullDir3s,Precip1_Run12hr,RH%%_Av,Wind1GustDay3s,SnowDepth2BestMQN,Wind1Gust1s,IPA2_TankLevel,Blank3,Blank2,RecNum,CR1000_PTemp_Inst,Batt_Volts_Aux1,SnowDepth2,SnowDepth1BestMQN,Lysim1_10min,Precip1_Run1hr,SolarRd1_Inst,SolarRad_Av,VaisalaTemp1_Avg,Lysim1_Day,Pump1Counter,UVMWD,SnowDepth1,TmStamp,Wind1GustDir1s,Pump1TankLevel,IPA1_TankLevel,MHWS,Blank1,AirTemp1_MaxObs,Blank4,AirTemp1_2DeltaT,Lysim1_Run12hr,AirTemp1_Av,SnowWeight,CR1000_Batt_Volts,AirTemp2_Av,SnowDepth1_Delta24hr,Wind1Gust3s,Precip1_Run24hr,Pump2Counter,Precip1_EventTotal,Precip1_10min FROM nzta_belle1_aws_10 ORDER BY TmStamp DESC LIMIT %s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions