anitab-org / vms

THIS PROJECT IS ARCHIVED. Volunteer Management System.
GNU General Public License v2.0
1 stars 4 forks source link

Fixed Values are not retained in forms (event, job and shift) #742 #1131

Open codesankalp opened 3 years ago

codesankalp commented 3 years ago

Modified post view of forms to retain the values of submitted form when there is an error in form validation to increase users experience.

Fixes #742

Screenshots

Before submission of form:

event_edit_1

After submission of form:

event_edit_2

Tasks done:

codecov[bot] commented 3 years ago

Codecov Report

Merging #1131 into develop will decrease coverage by 0.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1131      +/-   ##
===========================================
- Coverage    87.18%   87.10%   -0.08%     
===========================================
  Files           85       85              
  Lines         4057     4080      +23     
  Branches       237      238       +1     
===========================================
+ Hits          3537     3554      +17     
- Misses         450      455       +5     
- Partials        70       71       +1     
Impacted Files Coverage Δ
vms/event/views.py 79.61% <100.00%> (+0.29%) :arrow_up:
vms/shift/views.py 61.40% <0.00%> (-1.21%) :arrow_down:
vms/job/views.py 89.93% <0.00%> (+2.68%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0189ce8...4fc514c. Read the comment docs.

codesankalp commented 3 years ago

@gaurivn please review this.

keshakaneria commented 3 years ago

@codesankalp codecov test is failing, did you check the tests locally?

codesankalp commented 3 years ago

@codesankalp codecov test is failing, did you check the tests locally?

Yes, I don't know why, should I change anything @keshakaneria.

codesankalp commented 3 years ago

@devkapilbansal in this commit I have removed the try except block inside for loop as mentioned by mentors.

devkapilbansal commented 3 years ago

@codesankalp like you can change this line city = City.objects.get(name=city_name) to city = City.objects.filter(name=city_name).first() and remove the try except block.

codesankalp commented 3 years ago

@devkapilbansal can you please check the build of Travis as I think the error in the build is not related to my commit.

devkapilbansal commented 3 years ago

@gaurivn @keshakaneria @SanketDG can you please look into the problem