Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate circular menu relationships. #1

Open
Ejemyr opened this issue Feb 14, 2021 · 0 comments
Open

Validate circular menu relationships. #1

Ejemyr opened this issue Feb 14, 2021 · 0 comments

Comments

@Ejemyr
Copy link
Member

Ejemyr commented Feb 14, 2021

https://github.com/Fysiksektionen/Hemsida/blob/1ad5272a59fc72c6abbcf80c3a3f1515b8ab069a/server/website/models/menus.py#L81

Här görs ett försök att kolla så att ett menyobjekt inte länkar till sig själv. Dock kollas inte om det länkaa indirekt till sig själv via en annan menu. Kanske ska kolla igenom alla menyer itterativt för att se så att det inte blir en loop.

Glöm inte att kolla på att göra detta databaseffektivt med select_related().

@HugoSave HugoSave transferred this issue from Fysiksektionen/Hemsida May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant