gltn / stdm

STDM is a free and open source pro-poor land recordation system based on QGIS, PostgreSQL and PostGIS.
http://stdm.gltn.net/
GNU General Public License v2.0
30 stars 30 forks source link

Error on Digitizing Spatial Unit Saved in Qgs Project #366

Open gkahiu opened 5 years ago

gkahiu commented 5 years ago

A PostgreSQL error occurs when you try to save layer edits from a STDM layer that has been loaded from a previously saved Qgs project file.

Pre-condition - The layer/spatial entity must have at least one mandatory column.

Steps to reproduce the error:

  1. Save current project with an STDM spatial entity as one of the layers in the layers' panel; 2.Restart QGIS and open the previously saved project file; 3.Select the STDM spatial entity in the layers' panel, open an edit session and add a new feature. No need to log into STDM since the layer is already available from the project file;
  2. Upon completion of the digitization process (by right-clicking), the attribute form does not show (that's the 1st issue). Second, when you try to save the edit session, a PostgreSQL error is thrown most likely due to the attribute form not showing hence mandatory columns are not populated thereby violating PostgreSQL's not-null constraint
pgathogo commented 5 years ago

@gkahiu, I could not reproduce this issue on my setup, new features were saved correctly. The only thing that was consistent with your report is that the attribute form does not show, and I think its a good thing given that the user has not logged in.