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

fix(User): link to member is mandatory (LAN-825) #265

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright (c) 2013, Real Experts GmbH and contributors
# For license information, please see license.txt

import pandas as pd

import frappe
import pandas as pd
from frappe import _

from ..member.member import Member, get_link_filters, remove_duplicate_indices


Expand Down
3 changes: 3 additions & 0 deletions landa/organization_management/user/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def validate(doc: User, event=None):
_("User {0} is already linked to LANDA Member {1}").format(existing_user, doc.landa_member)
)

if not doc.landa_member and not frappe.flags.in_test:
frappe.throw(_("Please link the user to a LANDA Member."))

if not doc.module_profile and not frappe.flags.in_test:
doc.module_profile = "LANDA User"

Expand Down
1 change: 1 addition & 0 deletions landa/translations/de.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ Extra Columns,Zusätzliche Spalten,
Water Body Status,Gewässerstatus,
Row {0}: Item {1} is not valid for year of settlement {2}.,Zeile {0}: Artikel {1} ist nicht gültig für das Abrechnungsjahr {2}.,
We've received your query!,Wir haben Ihre Anfrage erhalten!,
Please link the user to a LANDA Member.,Bitte verknüpfen Sie den Benutzer mit einem Mitglied.,
Loading