rectification remplacement underscore nom machine

This commit is contained in:
Romain Beuque 2014-03-23 19:17:59 +01:00
parent 8489768b83
commit 0722244f2d
2 changed files with 7 additions and 6 deletions

View File

@ -399,11 +399,11 @@ class MachineAddController(AuthenticatedRestController):
#end if #end if
#endif #endif
name = try_name(name, 0)
#On retire les underscore interdits #On retire les underscore interdits
name = re.sub('_', '-', name) name = re.sub('_', '-', name)
name = try_name(name, 0)
# Génération de l'id de la machine et recherche d'une ip libre # Génération de l'id de la machine et recherche d'une ip libre
ip = IpReservation.get_first_free(self.user, residence_dn) ip = IpReservation.get_first_free(self.user, residence_dn)

View File

@ -44,7 +44,7 @@ class RoomsController(AuthenticatedBaseController):
def index(self, residence_name): def index(self, residence_name):
status = dict() status = dict()
areas = dict() areas = dict()
print str(datetime.datetime.now()) + "RoomsIndex0"
residence_dn = Residences.get_dn_by_name(self.user, residence_name) residence_dn = Residences.get_dn_by_name(self.user, residence_name)
if residence_dn is None: if residence_dn is None:
raise Exception("unknown residence") raise Exception("unknown residence")
@ -52,11 +52,12 @@ class RoomsController(AuthenticatedBaseController):
current_year = CotisationComputes.current_year() current_year = CotisationComputes.current_year()
cotisations_year = Cotisation.get_all_cotisation_by_year(self.user, residence_dn, current_year) cotisations_year = Cotisation.get_all_cotisation_by_year(self.user, residence_dn, current_year)
print str(datetime.datetime.now()) + "RoomsIndex1 - cotis"
stats = CotisationComputes.members_status_from_list_cotisations(self.user, residence_dn, cotisations_year) stats = CotisationComputes.members_status_from_list_cotisations(self.user, residence_dn, cotisations_year)
print str(datetime.datetime.now()) + "RoomsIndex2 - cotisComput"
members = dict() members = dict()
members_entries = Member.get_all(self.user, residence_dn) members_entries = Member.get_all(self.user, residence_dn)
print str(datetime.datetime.now()) + "RoomsIndex3 - members"
members_entries_dict = dict() members_entries_dict = dict()
for member in members_entries: for member in members_entries:
members_entries_dict[member.dn] = member members_entries_dict[member.dn] = member
@ -77,7 +78,7 @@ class RoomsController(AuthenticatedBaseController):
stats['number_of_rooms'] = Room.get_number_of_rooms(self.user, residence_dn) stats['number_of_rooms'] = Room.get_number_of_rooms(self.user, residence_dn)
stats['empty_rooms'] = [] stats['empty_rooms'] = []
print "here 4" print str(datetime.datetime.now()) + "RoomsIndex4"
for area in Room.get_areas(self.user, residence_dn): for area in Room.get_areas(self.user, residence_dn):
areas[area] = dict() areas[area] = dict()