You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then there will be a landscape with no associated group in the DB. I think with the current code logic this is not possible, but we could silently open ourselves up to this bug in the future if the logic changes such that self.created_by is not always non-null. This should probably throw an error so that the landscape does not get created in this case. But I am not sure about this.
Additional context
I don't think this is currently a problem, but just wanted to record this observation somewhere. Could be a good first issue to investigate further.
The text was updated successfully, but these errors were encountered:
Description
If this condition in the landscape creation code fails:
terraso-backend/terraso_backend/apps/core/models/landscapes.py
Line 107 in 560a3d9
then there will be a landscape with no associated group in the DB. I think with the current code logic this is not possible, but we could silently open ourselves up to this bug in the future if the logic changes such that
self.created_by
is not always non-null. This should probably throw an error so that the landscape does not get created in this case. But I am not sure about this.Additional context
I don't think this is currently a problem, but just wanted to record this observation somewhere. Could be a good first issue to investigate further.
The text was updated successfully, but these errors were encountered: