0.8.5
create_or_change_route_ajax return route_id
This commit is contained in:
@@ -240,6 +240,8 @@ def create_or_change_route_ajax(request, route_id=None):
|
||||
obj.owner = request.user
|
||||
obj.save()
|
||||
|
||||
route_id = obj.id
|
||||
|
||||
routes_Dict = get_routes_Dict(request.user)
|
||||
|
||||
if 'errors' in routes_Dict:
|
||||
|
||||
@@ -75,14 +75,14 @@ class Route(BaseModel):
|
||||
ordering = ('name',)
|
||||
|
||||
def from_country_n_city_str(self):
|
||||
res = 'Неизвестно'
|
||||
res = _('Неизвестно')
|
||||
if self.from_city:
|
||||
res = self.from_city.get_country_n_city_str()
|
||||
|
||||
return res
|
||||
|
||||
def to_country_n_city_str(self):
|
||||
res = 'Неизвестно'
|
||||
res = _('Неизвестно')
|
||||
if self.to_city:
|
||||
res = self.to_city.get_country_n_city_str()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user