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 testing result being displayed as None #965

Merged
merged 1 commit into from
Jan 11, 2017

Conversation

black3r
Copy link
Member

@black3r black3r commented Jan 8, 2017

  • Happened only when protocol was loaded through AJAX, because the AJAX view wasn't properly updated when we moved the verbose tester responses to constants.py
  • maybe we should consider not displaying it like this, alternative usage may be for example creating a specific templatetag |verbose_tester_response, or adding the SUBMIT_VERBOSE_RESPONSE constant to global template context?

fixes #894

- Happened only when protocol was loaded through AJAX, because the AJAX view wasn't properly updated when we moved the verbose tester responses to constants.py
- maybe we should consider not displaying it like this, alternative usage may be for example creating a specific templatetag |verbose_tester_response, or adding the SUBMIT_VERBOSE_RESPONSE constant to global template context?

fixes #894
@ZoltanOnody
Copy link
Member

ZoltanOnody commented Jan 8, 2017

Current coverage is 71.51% (diff: 100%)

Merging #965 into master will increase coverage by <.01%

@@             master       #965   diff @@
==========================================
  Files           214        214          
  Lines          6981       6982     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           4992       4993     +1   
  Misses         1989       1989          
  Partials          0          0          

Powered by Codecov. Last update c47b257...36ef85d

@maaario
Copy link
Contributor

maaario commented Jan 8, 2017

Momentalne sa to riesi takto submit_verbose_response|lookup:test.result.

Je to tak riesene preto, ze sa to pouizva iba pre renderovani protokolu - a tak neviem, ci ma zmysel kvoli tomut robit dalsi filter.
Inde, kde sa pouiziva verbose response, sa pouziva metoda modelu Submit : tester_response_verbose

@black3r
Copy link
Member Author

black3r commented Jan 8, 2017

vidim ako sa to riesi, vid. fix ktory som spravil.., co sa mi nie celkom paci na sucasnom rieseni je fakt, ze je error-prone na taketo errory, ake nastali tuna ==> kazdy view, ktory pouziva template protocol.html musi davat do contextu premennu submit_verbose_response aby to fungovalo, inak to skonci s None

custom filter, assignment_tag, alebo context_processor umoznuju k tejto premennej pristupovat priamo z templatu, obchadzajuc view, takze keby sme nahodou pridali treti view, ktory pouziva tento template, nemuseli by sme pri nom davat pozor na tuto context premennu

@koniiiik
Copy link
Member

koniiiik commented Jan 9, 2017 via email

@maaario
Copy link
Contributor

maaario commented Jan 9, 2017

No, Roman keď chceš, tak to môžeš spraviť custom filtrom, ale nemyslím si,
že sa tu bude niečo v najbližších mesiacoch meniť.

Nová submit app zatiaľ nerefershuje stránku po dostaní protokolu, ale napísal som si tam poznámku, že toto chcem možno riešiť custom filtrom ... tuto trojsten/submit#8
V novej submit app som sa tiež snažil zgrupovať všetky testing+review statusy a ich preklady na jedno miesto: https://github.com/trojsten/submit/blob/master/submit/constants.py

Copy link
Member

@mhozza mhozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto approvujem ako quick fix. Idealne by to bolo spravit poriadne filtrom alebo tagom. Moze byt zvlast PR.

@black3r
Copy link
Member Author

black3r commented Jan 11, 2017

Ja v dobrej viere ocakavam, ze do mesiaca/dvoch bude nova submit app a bude to spravene poriadne tam (kludne tuto feature do novej submit app dokodim, kedze tam este nie je), namiesto toho aby sa to fixovalo na viacerych miestach..

(Ak bude submit app az neskor, tak sa ozvite a spravim poriadny fix aj sem)

@black3r black3r merged commit d3f1ea4 into master Jan 11, 2017
@black3r black3r deleted the fix-protocol-result-display branch January 11, 2017 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nezobrazuju sa chybove hlasky v testovaci
5 participants