Commit e30b53cf31948a9fe154f9097714ea03b1a5ae4d

Authored by janek37
1 parent df4214e3

poprawiony bug z podglądem tabelki dla niezapisanego hasła

dictionary/ajax_lexeme_view.py
... ... @@ -43,11 +43,13 @@ def inflection_tables(request, variant, lexeme_id):
43 43  
44 44 @render_ajax(template='table_preview.html', method='get')
45 45 def table_preview(request, lexeme_id, lip_id, pattern, attr_data=None,
46   - gender=None):
  46 + gender=None, entry=None):
47 47 lexeme = Lexeme.all_objects.get(pk=lexeme_id)
48 48 if not lexeme.perm(request.user, 'view'):
49 49 raise AjaxError('access denied')
50 50 try:
  51 + if entry is not None:
  52 + lexeme.entry = entry
51 53 pattern = Pattern.objects.get(name=pattern)
52 54 gender = Gender.objects.get(id=gender) if gender else None
53 55 if attr_data:
... ...