Comments (5)
Don't understand why there is a DeprecationWarning here, think the code will work just fine if you delete the error condition.
diff --git a/karaage/people/models.py b/karaage/people/models.py
index dfdd856..3f7f9bc 100644
--- a/karaage/people/models.py
+++ b/karaage/people/models.py
@@ -723,12 +723,6 @@ class Group(models.Model):
sync_members.alters_data = True
def add_person(self, person):
- from karaage.projects.models import Project
- ct = self.content_type
- if ct and ct.model_class() is Project:
- raise DeprecationWarning(
- 'Add project group members via ProjectMembership.',
- )
self.members.add(person)
add_person.alters_data = True
from karaage.
On second thoughts this code really is broken.
I thought I saw code that synced changes from Group to ProjectMembership, but in actual fact it syncs in the opposite direction, ProjectMembership to Group. There is a TODO in the code to fix this:
TODO: Automatic update project membership using signals from Group.members, using defaults defined below.
If fixing this, need to make sure you don't create a loop with ProjectMembership notifying changes to Group and Group notifying changes to ProjectMembership.
Reopening.
from karaage.
Hi Brian,
Sounds like the TODO is broken. The pattern should be that POSIX groups are output from other sources such as ProjectMembership, and as such sync should always be from to Group.
Regards,
Tyson.
from karaage.
You mean "sync should always be from ProjectMembership to Group" right?
from karaage.
Indeed - sync should always be from ProjectMembership to Group. Rewording fail...
from karaage.
Related Issues (20)
- Create documentation at karaage4.readthedocs.org
- Make ProjectMembership data update when Group table data changes HOT 1
- Configure Jenkins advanced metrics
- Reports use aggregated Usage model
- Move LDAP into plugin
- Create dashboard
- Drop relation to group from institute (confirm whether this is appropriate first) HOT 2
- Migrations broken HOT 4
- tests fail HOT 1
- no way to disable plugins HOT 1
- grant_leader/revoke_leader broken
- tags inconsistant HOT 3
- Set up Continuous Integration
- Tune up the new schema configuration
- Set up a Karaage 4 branch on Github
- Get up a Jenkins instance for Karaage 4
- Plan migrations for new schema
- Write migrations
- Create a Karaage 4 README.rst
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 karaage.