Recovering the Parisi--Sourlas polymer action from the lattice