GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.44k stars 1.13k forks source link

Bug and Solution for error (m2m_changed() missing 1 required positional argument: 'using') in datasets (in django admin) #12206

Closed HaziqLucii closed 2 months ago

HaziqLucii commented 5 months ago

Expected Behavior

save without any error

Actual Behavior

got error missing positional argument like the error image below

Steps to Reproduce the Problem

  1. go to datasets, choose any data image
  2. save
  3. the error screen : image

To solve this :

  1. go to geonode/geonode/base/models.py
  2. go to line 420, in this function add using positional arg like this : signals.m2m_changed.send( sender=self.through, action="pre_add", instance=self.instance, reverse=False, model=self.through.tag_model(), pk_set=new_ids, using='default', )
  3. go to line 435, same solution to the above, add the using positional argument.

Specifications

giohappy commented 5 months ago

@HaziqLucii I'm not able to reproduce the error. I've tried with several datasets both locally and on stable demo and the save action for datasets is working fine.

Do you have some hierarchical keyword assigned to the dataset?

HaziqLucii commented 5 months ago

@HaziqLucii I'm not able to reproduce the error. I've tried with several datasets both locally and on stable demo and the save action for datasets is working fine.

Do you have some hierarchical keyword assigned to the dataset?

is there something required in the form that i need to fill? and no there's no hierarchical keyword assigned

giohappy commented 2 months ago

is this issue still valid @HaziqLucii? I wasn't able to reproduce it with the latest versions of GeoNode

HaziqLucii commented 2 months ago

I already solved it by doing that, you can close this issue. I also dont know why I had to add that in the function, but yeah if it works, it works lol.

Thanks again!