3

I just updated to QGIS 3.20. Now I can no longer do multiple updates, due to a constraint at the field ID. I changed the constraint of ID but the problem stays.

I do can make changes when I select objects in the map.

enter image description here

enter image description here

4 Answers 4

3

I had the same problem once. In my case I had placed a constraint on what values a field can contain.

Check the field you're trying to give a new value to, go to the form view of the layer and check if you have placed any constraints on that field. In my case for example it was a "radius" field that I had once decided should not take a value of more than 8. Hope your issue is as simple this one.

enter image description here

Edit Just realized the field you had issues with was an id field, could be a case of null or duplicates in the id field? Null should be easy to find, for duplicates check this nifty technique: Identifying duplicate attributes in field using QGIS?

1

Same issue. Had to revert to 3.16.x. Problem gone.

0

I just ran into the same problem, on a 3.26.0-Buenos Aires QGIS.

It took me some time to figure it out, but finally, all I had to do was to explicitly add a primary key to the table.

In psql (or any other decent SQL interface to the PostgreSQL server), this did the trick:

ALTER TABLE table_that_i_want_to_edit_in_qgis ADD PRIMARY KEY (id);
-- (provided that id is actually a SERIAL or something
--  equivalent, a unique identifier for the table 
--  table_that_i_want_to_edit_in_qgis)

After that, I was able to edit attributes, modify geometries, etc. in QGIS.

0

Bug fixed and have to be OK in QGIS 3.26.2.

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 11 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.