chore(access): remove get_url_kwargs function as it's not required
ref: #847 #840 #841 #842 #843 #845
This commit is contained in:
@ -141,24 +141,3 @@ class Entity(
|
|||||||
|
|
||||||
|
|
||||||
return related_model
|
return related_model
|
||||||
|
|
||||||
|
|
||||||
def get_url_kwargs(self, many = False) -> dict:
|
|
||||||
|
|
||||||
model = self.get_related_model()
|
|
||||||
|
|
||||||
if (len(self._meta.parents) == 0 and model is None) or not many:
|
|
||||||
|
|
||||||
return {
|
|
||||||
'pk': self.id
|
|
||||||
}
|
|
||||||
|
|
||||||
if model is None:
|
|
||||||
|
|
||||||
model = self
|
|
||||||
|
|
||||||
kwargs = {
|
|
||||||
'entity_model': str(model._meta.verbose_name).lower().replace(' ', '_'),
|
|
||||||
}
|
|
||||||
|
|
||||||
return kwargs
|
|
||||||
|
Reference in New Issue
Block a user