Comments (3)
l take this up after the current CDC, so as to not disturb the equilibrium when it's needed the most. @thealphadollar
from mftp.
@icyflame @hargup I can see that we have the code for getting attachment from the ERP (L77) but then it is removed as a sanitisation in L108. I'm curious to know why this step has been taken? We should have been sending attachments at some point, I suppose.
Also, do you think providing the attachment URL is of use? I guess not since the links are protected behind ERP auth and hence they will have to login, and ERP does not use referrer head to redirect user post login. Also, the CDC has removed attachments from their public notice board(http://www.cdc.iitkgp.ac.in/notice/Placements) so we cannot put links from there as well.
from mftp.
I'm curious to know why this step has been taken?
The function removes the raw attachment bytes from the record that's going to be stored in the database. The key is deleted only from the shallow copy of the notice object. The shallow copy isn't the one that's actually sent to the user.
sanitised_notice = sanitise_notice_for_database(notice)
# The notice object used to check whether the current notice has already been sent to the
# user or not => This object does NOT have the attachment_raw key
db_notice = notices_coll.find_one(sanitised_notice)
if db_notice is None:
# The notice object that's sent to the user => this does have the attachment_raw key
different_notices.append(notice)
As long as nothing has changed in the way attachments are stored and returned by the ERP, the existing code should have just continued to work.
from mftp.
Related Issues (20)
- Repeated email sent for some Notices HOT 5
- Change subject from "Notice: CV submission" to "Placement: CV submission" HOT 2
- Update Vulnerable Dependency HOT 7
- Understand why bs4 recursion depth exceeded happens HOT 2
- Migrate From `mLab` Heroku Addon HOT 4
- Switch From Ping Mechanism To Heroku Scheduler HOT 15
- [IMPROVEMENT] Failure Monitoring HOT 4
- README update HOT 1
- Duplicate Mails HOT 1
- Project dependencies may have API risk issues HOT 1
- Move from Python 2 to 3 HOT 10
- MFTP Revamp HOT 1
- Personally tweaked features HOT 2
- Cronjob as alternative to service HOT 5
- Dockerise HOT 3
- MFTP doctor HOT 2
- Logs rotation HOT 7
- Documentation Update for MFTP as a cronjob
- Google Group Limitations HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mftp.