Skip to content

Comments

(ac-4): week 4: fixed HOD leave module and some bugs in the student leave module.#1100

Merged
akshatnema merged 5 commits intoFusionIIIT:ac-4from
Lawful2002:faculty-leave
Mar 4, 2023
Merged

(ac-4): week 4: fixed HOD leave module and some bugs in the student leave module.#1100
akshatnema merged 5 commits intoFusionIIIT:ac-4from
Lawful2002:faculty-leave

Conversation

@Lawful2002
Copy link
Contributor

Issue that this pull request solves

Closes: NA

Proposed changes

Add try, except blocks to catch errors, along with default values for some of the models to prevent crashing if database contents are missing. Added some validation to the student leave module.

Brief description of what is fixed or changed

HOD leave module now loads properly.
Extra validation is added to the student leave module.

Types of changes

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please describe):

Checklist

Put an x in the boxes that apply

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have created new branch for this pull request
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • My changes does not break the current system and it passes all the current test cases.

Screenshots

No UI is changed

Other information

Any other information that is important to this pull request

@Lawful2002 Lawful2002 changed the title (ac-4) : week 4 : fixed HOD leave module and some bugs in the student leave module. (ac-4) : week 4: fixed HOD leave module and some bugs in the student leave module. Feb 12, 2023
@Lawful2002 Lawful2002 changed the title (ac-4) : week 4: fixed HOD leave module and some bugs in the student leave module. (ac-4): week 4: fixed HOD leave module and some bugs in the student leave module. Feb 12, 2023
Copy link

@Sahil-Rochlani Sahil-Rochlani left a comment

Choose a reason for hiding this comment

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

Approved @akshatnema

errors['end_date'] = ['Past Dates are not allowed']
"""

print(data.get('document').size)
Copy link
Collaborator

Choose a reason for hiding this comment

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

kindly remove the print statement if not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

pytz
reportlab==3.5.59
requests==2.25.1
requests-oauthlib==1.3.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't change the requirements.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

#@python_2_unicode_compatible
class LeaveType(models.Model):
name = models.CharField(max_length=40, null=False)
name = models.CharField(max_length=40, null=False, default='casual')
Copy link
Collaborator

Choose a reason for hiding this comment

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

since you are changing the models.py, have you asked/informed these changes to Database Lead, Pranshu Nayak?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PranshuNayak, PTAL. This change is required for making sure that the leave module doesn't fail completely when the database is incomplete. The value casual is being used as a fallback here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM!

requirements.txt Outdated
jsonfield==3.1.0
jsonschema==3.2.0
kombu==5.0.2
kombu
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Lawful2002 You have pushed the changes of requirements.txt, kindly remove these from the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. PTAL

@akshatnema akshatnema merged commit fd53b1e into FusionIIIT:ac-4 Mar 4, 2023
@PranshuNayak
Copy link
Collaborator

@Lawful2002 please push the migrations generated for the model changes.

@Lawful2002
Copy link
Contributor Author

@PranshuNayak #1186

dcoder13 added a commit that referenced this pull request Mar 18, 2025
* (ac-4): week 4: fixed HOD leave module and some bugs in the student leave module. (#1100)

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* added new usecases

* removed migrations files

* Otheracademic 2024 (#1316)

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* Added pylint  (#1302)

* Create bandit_security_test.yml

Added Bandit security test for python

* Update bandit_security_test.yml

* Update bandit_security_test.yml

* Create pylint.yml

* Update pylint.yml

* Update pylint.yml

* Revert "Added pylint  (#1302)" (#1324)

This reverts commit c1359b7.

* removed migrations files

---------

Co-authored-by: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com>
Co-authored-by: Raman Chaudhary <97114586+ChaudharyRaman@users.noreply.github.com>

* bug fixes

* otheracademic update

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* I added my module otheracademic from scratch all functionality is implemented just need to set designation

* Added pylint  (#1302)

* Create bandit_security_test.yml

Added Bandit security test for python

* Update bandit_security_test.yml

* Update bandit_security_test.yml

* Create pylint.yml

* Update pylint.yml

* Update pylint.yml

* Revert "Added pylint  (#1302)" (#1324)

This reverts commit c1359b7.

* removed migrations files

* changes in programme_cuuriculam,adding version to models (#1330)

* bug fixes

---------

Co-authored-by: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com>
Co-authored-by: Raman Chaudhary <97114586+ChaudharyRaman@users.noreply.github.com>
Co-authored-by: Anudeep Sanapala <71971574+anudeeps0306@users.noreply.github.com>

* Updated Dashboard

* implemented leave,assistantship,nodues

* bug fixes

* bug fixes assistantship

* bug fixes no dues

* I add description to all functions,also removed unnecessary comment,also used better naming,removed hardcoded part of graduateseminar,add description of hod charfield,also described no_dues_not function and working

* modifications in notifications

* small error fixed

* various bug fixes

* fix formatting and remove debugging statements for existing views

* fix formatting and remove some unnecessary functions

* update: all fts specific views require the user to not be student and have valid designation

* remove unused urls

* add notifications on forward

* fix: send notifications from drafts as well

* fix: redirect on sending draft

* fix remarks to show blank in drafts

* fix and cleanup templates

* save attachments to drafts and allow .zip attachments

* fix formatting and UI changes in compose file template

* Delete FusionIIIT/applications/otheracademic/migrations/0002_auto_20240416_2046.py

* Delete FusionIIIT/applications/otheracademic/migrations/0003_auto_20240416_2047.py

* updated apis for ac-2 module

* removed migration files

* feat: confirm before unloading page and make the fields not required

* app changes

* add active tab highlight to sidebar

* fix extra html

* add File download as zip feature

* authorization

* fix: small formatting errors

* added migration files

* fix: inbox, drafts and archives are now ordered by time of creating and reception

* fix: forward file to error correctly and improve template

* fix: on draft saving without destination redirect is correctly placed

* fix: attachments added on sending from drafts

* changed files permissions

* Changed file persmissions

* another file changed

* FTS mig change restored

* Introduces Subtype option and implemented generate report

* Revert "Merging AC-4 to Latest-Staging"

* corrected acadadmin login issues

* added verify course api endpoint

* chore: added updated files for gymkhana in applications and templates

* fts user validation fixed and side panel notifications

* Delete FusionIIIT/applications/globals/migrations/0015_auto_20240425_0421.py

* Delete FusionIIIT/applications/research_procedures/migrations/0004_auto_20240425_0417.py

* Delete FusionIIIT/applications/globals/migrations/0014_auto_20240425_0417.py

* corrected ac-4 module

* refactor: api

* Delete FusionIIIT/applications/central_mess/migrations/0010_auto_20240425_0417.py

* Introduces Subtype option and implemented generate report

* corrected PHC notifications

* multi copis

* fix acadadmin error

* refactor: urls and views

* fixed issues of testing

* Resolve minor issues

* notification error in gad-2 resolved

* updated migrations for all modules

* add_projects updated

* dropdown added

* added ps-1

* bug fix in ac-7

* Enable,checks on  module and navigate in navbar

* Swayam, course code and minor fixes

* changes done final

* dep final push

* delete migrations

* Update requirements.txt

* Update requirements.txt

* Modify viewHIstory API

* Update 0001_initial.py

* apis added

* revert to db sync

* added ac-6, rspc

* added apis for app

* fixed bugs api chages

* rebate fix

* Update filetracking.html

* minor issues in the Dashboard

* this commit, adds a new search functionality, a new pagination feature, fixes sorting through dates and fixes archive option enable conditions

* updated mig

* corrected globals mig

* changed allot courses function to update pre registration data using excel sheet

* updated user card to show roll no

* increase options for less fee payment

* Update admin.py

* new feat. marks submission, improved attendance and grading scheme

* Health Center Contribution - PR201 (#1625)

* All changes of health center module

* Redundancy bug fixes

* Minor bug fix
Patie0tn log form undefined behavior when changing radio field

* Guideline Configs

* Removed print statements according to guidelines

---------

Co-authored-by: ChallaBharadwajReddy <challabharadwajreddy@gmail.com>

* Configurations for Fusion-client (#1628)

* Made updated views for authentication, toggling notifications and removed dashboard view

* Made a view for updating a role

* migration files for changes made in extra_info model

---------

Co-authored-by: Pratik <pratiksolanki2026@gmail.com>

* fix: Resolved System Check errors (#1630)

- fix: Changed one line bugs
* Resolved system check errors
* Changed some fields in IWD Module
* Fixes creation of unwanted migration files

- chore: migration files for the previous commit changes

* Added API folder in iwdModuleV2

* Added endpoints in API folder in iwdModuleV2

* Added additional endpoints in API folder in iwdModuleV2

* fix[api] : fetchdesignation, requestview

* fix : view file endpoint

* Resolved Major bug and also added username field in auth data (#1635)

* Made updated views for authentication, toggling notifications and removed dashboard view

* Made a view for updating a role

* migration files for changes made in extra_info model

* Health Center Contribution - PR201 (#1625)

* All changes of health center module

* Redundancy bug fixes

* Minor bug fix
Patie0tn log form undefined behavior when changing radio field

* Guideline Configs

* Removed print statements according to guidelines

---------

Co-authored-by: ChallaBharadwajReddy <challabharadwajreddy@gmail.com>

* fix: Resolved System Check errors (#1630)

- fix: Changed one line bugs
* Resolved system check errors
* Changed some fields in IWD Module
* Fixes creation of unwanted migration files

- chore: migration files for the previous commit changes

* fix: Resolved major bug and also added username field in auth data.

---------

Co-authored-by: ramGopal <129493911+ramG-reddy@users.noreply.github.com>
Co-authored-by: ChallaBharadwajReddy <challabharadwajreddy@gmail.com>

* minor updates while updating the issue-work-order table (#4)

* minor changes (#5)

* minor changes

* minor changes

* approve/reject  and view file

* fix: work order

* Minor changes in addBudget and editBudget endpoints (#6)

* fix : serializer

* modified views related to audit document view (#7)

* Added API folder in iwdModuleV2

* modified views related to audit document view

* Minor changes for integration with frontend

* fixed apis

* fix: serializer overriding requestCreatedBdBy value

* fix: serializer overriding requestCreatedBdBy value

* fix api

* chore: made handlers consistent

* fix: some minor fixes

* major fixes

* minor fixes

* add: updated urls.py and file upload

* fix: handle dean process request file attachment upload

* fix : forward file

* Test os 3 (#1700)

* Setup Email Notifications and architected new announcement system

* Added module to announcement schema and lazy loading to specific_users

* Added create announcement and get announcement apis and added redis as dependency

* Sorted GET Announcement result order

* department info api (#1)

Co-authored-by: aarav0012 <aaravjainjn@email.com>

* rspc notification api added

---------

Co-authored-by: Akash Kumar Sah <akashsah2003@gmail.com>
Co-authored-by: aarav0012 <aaravjainjn@email.com>

* Dashboard client (#1697)

* Get Booking data api added (#1)

* bug: fix conditional rendering of booking req

* Dashboard client (#3)

* Get Booking data api added

* active booking api

* add: forwardBooking confirmBooking

* Dashboard client (#4)

* Get Booking data api added

* active booking api

* Added cancelled, active, completed booking view functionality

* cancellation_request done

* reject option works

* Add items backend functionality (#5)

* add: rooms availibility

* fix: urls

* add: Account statement backend (#6)

* "add: account statements"

* resolved MC

* Updated visitor_hostel URLs and views:added partial booking API (#7)

Co-authored-by: Arun7113 <arunhyd2003@gmail.com>

* fix: partial booking feature

* fix: completed bookings

* fix: account statement

* fix: correct income display on account statement

---------

Co-authored-by: Hardik Vardaan <37293677+AtOM18@users.noreply.github.com>
Co-authored-by: ompandey0703 <142932201+ompandey0703@users.noreply.github.com>
Co-authored-by: Vishal-Github-21 <116187488+Vishal-Github-21@users.noreply.github.com>
Co-authored-by: JATOTHU ARUN <167317035+Pheonix7113@users.noreply.github.com>
Co-authored-by: Arun7113 <arunhyd2003@gmail.com>

* All changes of Complaint Management (#1704)

* eis module version 1 (#1706)

* fix: multiple file uploads, and ajax dropdown cbv

* add: added multiple drafts upload

* fix: uncommented mess migrations

* Department module Version 1 (#1709)

* [Dashboard] Modified Profile views to fetch relevant data only (#1711)

* SA-2 [New-UI] - updated APIs for use with fusion-client (#1717)

* chore: added linting

* changes in feedbackAPI

* feat: added update bill excel (#4)

* fix: migrations

* Fix: Fixed an api endpoint allowed method (#5)

* Added New API for Student Records, Implement Checks in RebateAPI. (#6)

* Change in feedbackAPI

* New API and filter in RebateApi

* Fix merge

* fix: api cleanup

---------

Co-authored-by: S-tej <132924903+S-tej@users.noreply.github.com>
Co-authored-by: Padarthi Karthik <133255355+karthikpadarthi@users.noreply.github.com>
Co-authored-by: Green Mansion <90859709+PrinceBujethia@users.noreply.github.com>

* SA-2 new UI updates (#1718)

* chore: added linting

* changes in feedbackAPI

* feat: added update bill excel (#4)

* fix: migrations

* Fix: Fixed an api endpoint allowed method (#5)

* Added New API for Student Records, Implement Checks in RebateAPI. (#6)

* Change in feedbackAPI

* New API and filter in RebateApi

* Fix merge

* fix: api cleanup

* deployment fixes

---------

Co-authored-by: S-tej <132924903+S-tej@users.noreply.github.com>
Co-authored-by: Padarthi Karthik <133255355+karthikpadarthi@users.noreply.github.com>
Co-authored-by: Green Mansion <90859709+PrinceBujethia@users.noreply.github.com>

* Old version(gad 2) (#1721)

* Added API folder in iwdModuleV2

* Added endpoints in API folder in iwdModuleV2

* Added additional endpoints in API folder in iwdModuleV2

* fix[api] : fetchdesignation, requestview

* fix : view file endpoint

* minor updates while updating the issue-work-order table (#4)

* minor changes (#5)

* minor changes

* minor changes

* approve/reject  and view file

* fix: work order

* Minor changes in addBudget and editBudget endpoints (#6)

* fix : serializer

* modified views related to audit document view (#7)

* Added API folder in iwdModuleV2

* modified views related to audit document view

* fixed apis

* fix: serializer overriding requestCreatedBdBy value

* fix: serializer overriding requestCreatedBdBy value

* fix api

* chore: made handlers consistent

* major fixes

* fix: handle dean process request file attachment upload

* fix : forward file

---------

Co-authored-by: Bhargavzz <vishnubhargavsitra@gmail.com>
Co-authored-by: Abhijeet <pabhijeet349@gmail.com>
Co-authored-by: dotniiko <115548274+dotniiko@users.noreply.github.com>
Co-authored-by: Dhruv Ratmele <129955117+Somgester@users.noreply.github.com>
Co-authored-by: Abhijeet Patil <133658873+abhiJeetP10@users.noreply.github.com>
Co-authored-by: Bhargavzz <133690080+Bhargavzz@users.noreply.github.com>

* Revert "Old version(gad 2) (#1721)" (#1723)

This reverts commit e528b98.

* fix:migrations

---------

Co-authored-by: Harshvardhan Singh <73544247+Lawful2002@users.noreply.github.com>
Co-authored-by: akshatnema <20bcs022@iiitdmj.ac.in>
Co-authored-by: Jack <jatindagar101@gmail.com>
Co-authored-by: SharanKumar06 <sharan123852@gmail.com>
Co-authored-by: xenouno <112983459+xenouno@users.noreply.github.com>
Co-authored-by: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com>
Co-authored-by: Raman Chaudhary <97114586+ChaudharyRaman@users.noreply.github.com>
Co-authored-by: Anudeep Sanapala <71971574+anudeeps0306@users.noreply.github.com>
Co-authored-by: Priyansh Mehta <96513964+Priyansh61@users.noreply.github.com>
Co-authored-by: Divyansh Tripathi <55395696+theoden42@users.noreply.github.com>
Co-authored-by: Aragorn-64 <advaysagarkar@gmail.com>
Co-authored-by: Prabhat Suman <32027224+prabhatsuman@users.noreply.github.com>
Co-authored-by: Bhavik Agarwal <bhavikiitian@gmail.com>
Co-authored-by: 21bcs035 <ar5136874yadav@gmail.com>
Co-authored-by: Mohit Saini <mailtomohit2002@gmail.com>
Co-authored-by: prabhatsuman <mr.prabhatsuman@gmail.com>
Co-authored-by: Prajjwal kapoor <68912239+prajjwalkapoor@users.noreply.github.com>
Co-authored-by: Varun Singh <73738410+varun7singh@users.noreply.github.com>
Co-authored-by: Divyanshu Sharma <21bcs079@iiitdmj.ac.in>
Co-authored-by: Anurag Goswami <maskeddeep@gmail.com>
Co-authored-by: Ravichendraa <ravichendraa@gmail.com>
Co-authored-by: itsspriyansh <priyanshkp01@gmail.com>
Co-authored-by: Daksh Bajaj <97049092+Daksh119@users.noreply.github.com>
Co-authored-by: Priyansh <88396544+itsspriyansh@users.noreply.github.com>
Co-authored-by: TusharGupta03 <tushargupta0312@gmail.com>
Co-authored-by: Prajjwal Kapoor <prajjwal.kapoor.mail@gmail.com>
Co-authored-by: aish0749 <aishwaryasaxena57@gmail.com>
Co-authored-by: Harshul-25 <charshul25@gmail.com>
Co-authored-by: hrithik09 <ranjan.hrithik09@gmail.com>
Co-authored-by: SukulSarve <143542658+SukulSarve@users.noreply.github.com>
Co-authored-by: ramGopal <129493911+ramG-reddy@users.noreply.github.com>
Co-authored-by: ChallaBharadwajReddy <challabharadwajreddy@gmail.com>
Co-authored-by: Pratik <pratiksolanki2026@gmail.com>
Co-authored-by: Bhargavzz <vishnubhargavsitra@gmail.com>
Co-authored-by: Abhijeet <pabhijeet349@gmail.com>
Co-authored-by: Pratik Solanki <128511266+Pratik2026@users.noreply.github.com>
Co-authored-by: dotniiko <115548274+dotniiko@users.noreply.github.com>
Co-authored-by: Dhruv Ratmele <129955117+Somgester@users.noreply.github.com>
Co-authored-by: Abhijeet Patil <133658873+abhiJeetP10@users.noreply.github.com>
Co-authored-by: Bhargavzz <133690080+Bhargavzz@users.noreply.github.com>
Co-authored-by: Zaid Alam <predcodes695@gmail.com>
Co-authored-by: Aarav Jain <128894052+aarav0012@users.noreply.github.com>
Co-authored-by: Akash Kumar Sah <akashsah2003@gmail.com>
Co-authored-by: aarav0012 <aaravjainjn@email.com>
Co-authored-by: SHRAMAN PAUL <pkpaulpostdn@gmail.com>
Co-authored-by: Hardik Vardaan <37293677+AtOM18@users.noreply.github.com>
Co-authored-by: ompandey0703 <142932201+ompandey0703@users.noreply.github.com>
Co-authored-by: Vishal-Github-21 <116187488+Vishal-Github-21@users.noreply.github.com>
Co-authored-by: JATOTHU ARUN <167317035+Pheonix7113@users.noreply.github.com>
Co-authored-by: Arun7113 <arunhyd2003@gmail.com>
Co-authored-by: K.Charan Teja Reddy <129493881+Charan2437@users.noreply.github.com>
Co-authored-by: Ramesh Babu <srameshbabu2004@gmail.com>
Co-authored-by: Vithesh Krishna <133671028+Vithesh2215@users.noreply.github.com>
Co-authored-by: Aditya Kumar Gupta <116958420+Adi8712@users.noreply.github.com>
Co-authored-by: S-tej <132924903+S-tej@users.noreply.github.com>
Co-authored-by: Padarthi Karthik <133255355+karthikpadarthi@users.noreply.github.com>
Co-authored-by: Green Mansion <90859709+PrinceBujethia@users.noreply.github.com>
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.

4 participants