Skip to content
Snippets Groups Projects
Commit 0f1596cc authored by User expired's avatar User expired
Browse files

openolat#165: do not create a new (disabled) subscriber entry in the migration...

openolat#165: do not create a new (disabled) subscriber entry in the migration to 14.2 when one already exists
parent aa0f3e46
No related branches found
No related tags found
No related merge requests found
...@@ -169,7 +169,7 @@ public class OLATUpgrade_14_2_0 extends OLATUpgrade { ...@@ -169,7 +169,7 @@ public class OLATUpgrade_14_2_0 extends OLATUpgrade {
List<Publisher> publishers = getPublisher(infoSubscription); List<Publisher> publishers = getPublisher(infoSubscription);
for(Publisher publisher:publishers) { for(Publisher publisher:publishers) {
Subscriber subscriber = notificationsManager.getSubscriber(identity, publisher); Subscriber subscriber = notificationsManager.getSubscriber(identity, publisher);
if(subscriber == null || !subscriber.isEnabled()) { if(subscriber == null) {
SubscriberImpl sub = new SubscriberImpl(publisher, identity); SubscriberImpl sub = new SubscriberImpl(publisher, identity);
sub.setEnabled(false); sub.setEnabled(false);
sub.setCreationDate(new Date()); sub.setCreationDate(new Date());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment